Я создаю сервер Oauth2 для моего приложения NUXT SPA, которое использует плагин @ Nuxtjs / auth.
Когда я вызываю this. $ Auth.loginWith (oauth2) сервер регистрирует
IdentityServer4.Validation.ScopeValidator:Error: Requests for token response type only must include resource scopes, but no identity scopes.
Я пытался изменить области, но ничего не изменилось.
Клиент настроен так:
new Client {
ClientId = "NUXT",
AllowedGrantTypes = GrantTypes.Implicit,
AccessTokenType = AccessTokenType.Reference,
AllowOfflineAccess = true,//Enables refresh token.
ClientSecrets = {
new Secret("password".Sha256())
},
AllowedScopes = {
IdentityServerConstants.StandardScopes.OpenId,
IdentityServerConstants.StandardScopes.Profile
},
RedirectUris = {
"http://localhost:3000",
"http://localhost:3000/inspire"
},
AllowAccessTokensViaBrowser = true
}
А в NUXT стратегия настроена так:
auth: {
strategies: {
oauth2: {
_scheme: 'oauth2',
authorization_endpoint: 'http://localhost:8000/connect/authorize',
userinfo_endpoint: 'http://localhost:8000/connect/userinfo',
scope: ['openid','profile'],
response_type: 'token',
token_type: 'Bearer',
redirect_uri: 'http://localhost:3000/inspire',
client_id: 'NUXT',
token_key: 'access_token',
}
}
}
как мне настроить nuxt или сервер идентификации для аутентификации на сервере?Заранее спасибо