okta / samples-nodejs-express-4

Express 4 samples. Will publish an artifact that can be consumed by end-to-end sample repos
Other
120 stars 118 forks source link

AuthSdkError: Unable to parse a token from the url #73

Closed yimingsue closed 4 years ago

yimingsue commented 4 years ago

I used implicit flow to integrate Okta OAuth2 with Angular6, my front-end config is like below: clientId: '0oa1l1418lWpy6uGE357', issuer: 'https://dev-351004.okta.com/oauth2/default', redirectUri: 'http://localhost:4200/implicit/callback', scopes: ['openid', 'profile', 'email'], responseTypes: ['id_token', 'token'], pkce: true but when I clicked login button and url redirect to 'http://localhost:4200/implicit/callback', I got below error: "OAuthError: The response type is not supported by the authorization server. Configured response types: [id_token, token]." I checked my r Request URL: https://dev-351004.okta.com/oauth2/default/v1/authorize?client_id=0oa1l1418lWpy6uGE357 &code_challenge=c8Gt0U161p1-qi2DrbvS9gyOKzrDFRpHyGfTSuUqfJs &code_challenge_method=S256&nonce=8xgaOy9IOCqZLgeXH9lRPQ46au0d9AHzQpuHDxQsM6w1aEjGGotYhihxOdhrZAF1 &redirect_uri=http%3A%2F%2Flocalhost%3A4200%2Fimplicit%2Fcallback &response_mode=fragment &response_type=code &state=N8vyXkQyYd7EMONcBelO3I9qwTzr9JjAcEMY7ttHDPi9SQglxSksoetnnuuuxiAC &scope=openid%20profile%20email Anybody come across this issue?

swiftone commented 4 years ago

@yimingsue - Thanks for the report. We're not aware of any bugs of this sort.

You mention Angular but are posting in the backend focused nodejs-express sample. Are you trying to use the backend or the frontend to manage communications with Okta? How is your application configured in the Okta Dashboard? Is it set up to be a SPA application?

swiftone commented 4 years ago

Closing issue - if this is still a problem, feel free to reopen with the requested details.