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 121 forks source link

redirect_uri is missing query string #127

Closed dman777 closed 2 years ago

dman777 commented 2 years ago

Running npm run okta-hosted-login-server I get Okta 400 when I click on the login from the sample page. This is saying:

Your request resulted in an error. The 'redirect_uri' parameter must be a Login redirect URI in the client app settings

The redirect url the express/node server constructs is

https://dev-7*25.okta.com/oauth2/default/v1/authorize?client_id=0o3trFVY5d7&scope=openid%20profile%20email&response_type=code&redirect_uri=http*%2Flocalhost%080%2Fauthorization-code%2Fcallback&state=yaN1Cp5V_RDQGXG_g0DldPxXWjO7x1-F09**5h78

But if you decode the redirect_uri it shows:

http://localhost:8080/authorization-code/callback&state=yaN1Cp5V_R*_g0DldPxXWjO7x1-F*w5h78

Where I think it meant to have state as a query string? callback&state= looks incorrect

image

dman777 commented 2 years ago

Closing as this was a issue with a mistype in my redirect url