Auth0 Home Blog Docs

Social Identity Provider + Opaque access_token

opaque-tokens
social-provider

#1

I have successfully integrated google and facebook into my mvc app using quick start custom login project code .
But, after the user authentication, i am getting Opaque access_token from Auth0. even though i specified audience property as mentioned below.

public IActionResult
LoginExternal(string connection,
string returnUrl = “/”)
{
var properties = new AuthenticationProperties() {
RedirectUri = returnUrl };

        if (!string.IsNullOrEmpty(connection))
            properties.Items.Add("connection",

connection);
properties.Items.Add(“audience”,
https://ronak01.auth0.com/api/v2/”);

        return new ChallengeResult("Auth0", properties);
    }

I want JWT access_token , because aft getting this token i will call dotnet core web-api which authorises the method based on JWT access_token and not opaque token

@abhishek.hingnikar , @abhishek , @prashant , @jmangelo :- can u give me some suggestion, am i missing something? I have urgency if you guys can give some suggestion it would be helpful for me.


#2

Your audience parameter is the Auth0 Management API identifier - you need to configure your own API in the API section, and use the identifier of that API as your audience parameter.


#3

@prashant thanks for reply…
As per your comment, i have created new Api and used its identifier’s value into “audience” in below mentioned code. But still i am getting opaque_token in response, can u please give me suggestions on this.


#4