I’m building a Bazor app and I cannot seem to be able to obtain a Refresh Token. Is there something I’m missing here in order to get this working?
Here is my Program.cs
builder
.Services
.AddOidcAuthentication(options =>
{
builder.Configuration.Bind("Auth0", options.ProviderOptions);
options.UserOptions.RoleClaim = builder.Configuration["Auth0:CustomClaimsSchema"] + "/roles";
options.ProviderOptions.AdditionalProviderParameters.Add("audience", builder.Configuration["Auth0:Audience"]);
})
.AddAccountClaimsPrincipalFactory<ArrayClaimsPrincipalFactory<RemoteUserAccount>>();
The config
"Auth0": {
"Authority": "https://--redacted--",
"ClientId": "--redacted--",
"Audience": "https://--redacted--",
"RedirectUri": "https://localhost:5000/auth/login-callback",
"CustomClaimsSchema": "https://--redacted--",
"DefaultScopes": ["email", "offline_access"],
"ResponseType": "id_token token"
}
My response is as follows
{
"id_token": "--redacted--",
"token_type": "Bearer",
"scope": "openid profile email offline_access",
"profile": {
"https://cannect.app/claims/user_id": "83sPs1siLa",
"https://cannect.app/roles": [
"tenant-owner",
"system-user"
],
"https://cannect.app/tenants": [
{
"Gs1CompanyPrefix": "4463756",
"TenantId": "kQ0Jev",
"TenantName": "cannect",
"TenantRole": "tenant-owner"
},
{
"Gs1CompanyPrefix": "4463756",
"TenantId": "kQ0Jev",
"TenantName": "cannect",
"TenantRole": "tenant-owner"
}
],
"given_name": "Chase",
"family_name": "---",
"nickname": "chase.---",
"name": "Chase ---",
"picture": "https://lh3.googleusercontent.com/a/-redacted-",
"locale": "en",
"updated_at": "2023-09-04T16:30:44.093Z",
"email": "-redacted-",
"email_verified": true,
"sub": "google-oauth2|-redacted-",
"sid": "-redacted-"
},
"expires_at": 1693852247
}
And I’ve definitely turned on Refresh Tokens in my dashboard