I am trying to authorize a react project via IdentityServe.
Sorry, there was an error : invalid_request
Missing openid scope
Request Id: 0HM6DDV35HLDE:00000001
Tell me what could be the reason?It seems that the urls is correct. Most likely the reason is in the config parameters.
Config:
public static IEnumerable<Client> Clients =>new List<Client>
{
new Client
{
ClientId = "js_oidc",
ClientName = "Javascript Client",
AllowedGrantTypes = GrantTypes.Implicit,
AllowAccessTokensViaBrowser = true,
AbsoluteRefreshTokenLifetime = 200,
IdentityTokenLifetime = 15,
AccessTokenLifetime = 100,
AuthorizationCodeLifetime = 15,
SlidingRefreshTokenLifetime = 120,
RedirectUris =
{
"http://localhost:3000/callback.html",
"http://localhost:3000/silent.html"
},
PostLogoutRedirectUris = { "http://localhost:3000/index.html" },
AllowedCorsOrigins = { "http://localhost:3000" },
AllowedScopes =
{
IdentityServerConstants.StandardScopes.OpenId,
IdentityServerConstants.StandardScopes.Profile,
IdentityServerConstants.StandardScopes.Email,
"api1"
}
}
};
AuthService:
constructor() {
const settings = {
authority: "http://localhost:5001/",
client_id: "js_oidc",
redirect_uri: "http://localhost:3000/callback.html",
silent_redirect_uri: "http://localhost:3000/silent.html",
post_logout_redirect_uri: "http://localhost:3000/index.html",
scope: "api1"
};
this.userManager = new UserManager(settings);
}