How to get OAuth token to call APi from Angular application

Hi Team,

We have an angular application that is using SAML authentication using auth0 IDP.

Now, We need to call some API from same Angular application after the login. This api is expecting OAuth token from auth0 in authorization header. We are stuck how to get this OuAth token from angular application after authentication done from SAML.

Can you please provide some sample code for this. Also if posible please provide example that will return OAuth token in call response we do not want to use callback.

Regards,
Manish

Hi @snehal.libra,

Have you looked at using this method:

i am new to this.

is it safe to use this. as i see that it’s in BETA and note about not to use in Production. do we have any other alternative for this SDK? can we do similar “getAccessTokenSilently” via auth0.js ?

I must have linked the wrong page. The angular SDK is on release v1.1

Here is the SDK repo if you want to take a looks: