I can not connect okta/okta-vue(Vue.js) with the identityserver4
config.cs in Identityserver4
new Client
{
ClientName="TiT",
ClientId="titId",
AllowedGrantTypes=GrantTypes.Implicit,
AllowAccessTokensViaBrowser=true,
AccessTokenType = AccessTokenType.Reference,
UpdateAccessTokenClaimsOnRefresh = true,
AllowOfflineAccess = true,
RedirectUris = new List<string>()
{
"http://localhost:8080/implicit/callback"
},
PostLogoutRedirectUris = {
//"https://localhost:44392/signout-callback-oidc"
//"http://localhost:8080/index.html"
},
AllowedCorsOrigins = {
"http://localhost:8080"
},
EnableLocalLogin=true,
AllowedScopes =
{
IdentityServerConstants.StandardScopes.OpenId,
IdentityServerConstants.StandardScopes.Profile,
IdentityServerConstants.StandardScopes.Address,
"titapi",
"roles",
"instituicao"
},
ClientSecrets = new List<Secret>()
{
new Secret("secret".Sha256())
},
AlwaysIncludeUserClaimsInIdToken=true
}
index.js in okta
Vue.use(Auth,{
issuer: 'https://localhost:44392',
client_id: 'titId',
redirect_uri: 'http://localhost:8080/implicit/callback',
scope: 'openid profile address roles instituicao titapi offline_access'
})
Vue.use(Router)
let router = new Router({
mode: 'history',
routes: [
{
path: '/',
name: 'Hello',
component: Hello
},
{
path: '/implicit/callback',
component: Auth.handleCallback()
},
{
path: '/posts-manager',
name: 'PostsManager',
component: PostsManager,
meta: {
requiresAuth: true
}
}
]
})
router.beforeEach(Vue.prototype.$auth.authRedirectGuard())
export default router
Erro: Failed to load resource: the server responded with a status of 404 (Not Found)