# AngularJS 1.5 with API access

**URL:** <https://community.auth0.com/t/angularjs-1-5-with-api-access/6332>\
**Category:** Get Help\
**Tags:** angularjs-api-silent\
**Created:** [April 24, 2017, 7:53am UTC](https://community.auth0.com/t/angularjs-1-5-with-api-access/6332 "2017-04-24T07:53:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rmaurer](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@rmaurer](https://community.auth0.com/u/rmaurer)\
**Post date:** [April 24, 2017, 7:53am UTC](https://community.auth0.com/t/angularjs-1-5-with-api-access/6332/1 "2017-04-24T07:53:08Z")

</div>

I want to use Auth0 with my AngularJS 1.5+ web application. I need to be able to authenticate users from the web application and then use the Auth0 token to secure my back end API. I also would like to not force them to re-enter their password ever few hours.

Is there a good tutorial or documentation on how to implement Auth0 for Angular and configure it for silent login and api access? I can only seem to be able to get one or the other working but not both at the same time.

Bob

---

<div class="post-metadata">

**Author:** ![prashantT](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/prashantt/32/6002_2.png) [@prashantT](https://community.auth0.com/u/prashantT)\
**Post date:** [April 24, 2017, 2:25pm UTC](https://community.auth0.com/t/angularjs-1-5-with-api-access/6332/2 "2017-04-24T14:25:50Z")

</div>

The following links outlines the Implicit Grant flow for client-side applications to obtain access tokens to call your API:

- [https://auth0.com/docs/api-auth/grant/implicit](https://auth0.com/docs/api-auth/grant/implicit)
- [Implicit Flow with Form Post](https://auth0.com/docs/api-auth/tutorials/implicit-grant)

---

<div class="post-metadata">

**Author:** ![rmaurer](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@rmaurer](https://community.auth0.com/u/rmaurer)\
**Post date:** [August 30, 2017, 10:42am UTC](https://community.auth0.com/t/angularjs-1-5-with-api-access/6332/3 "2017-08-30T10:42:44Z")

</div>

Should I be using the current version of Lock, V10 or an older version? The quick start is all in Lock 8 (I think) and all the documentation is for lock 10.

The reason I ask, is that using the older version of Lock, I can get the social and username-password to work, but I can’t seem to set the access\_type=offline for Google. When I use Lock V10, I can get Google to work perfectly, but username-password does not work. Since I have a back end api, I have to enable OIDC compliance, which let’s me use an Audience, but as soon as I turn that on, username-password logins do not work.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 2, 2018, 5:53am UTC](https://community.auth0.com/t/angularjs-1-5-with-api-access/6332/4 "2018-03-02T05:53:26Z")

</div>


