Skip to content

app without client_secret (still) not working? #1426

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
n2ygk opened this issue May 23, 2024 · 3 comments
Closed

app without client_secret (still) not working? #1426

n2ygk opened this issue May 23, 2024 · 3 comments
Labels

Comments

@n2ygk
Copy link
Member

n2ygk commented May 23, 2024

I'm trying to achieve an Authorization Code with PKCE flow and public client for a Single Page web App (that can't keep a client_secret safe). I am using the latest release 2.4.0 but having the same issue described above.

  • I register a new app with Client type = Public Grant type = Authorization code and Algorithm = RSA 256 (because I'm using OIDC) - screenshot below
  • When I include the Client Secret in Postman, I get both the code and token correctly ✅
  • When I omit the Client Secret, I get the code returned OK but the "POST /o/token/ returns 401 and gives me "Error: invalid_client" ❌
  • I've tried with both PKCE_REQUIRED true and false

@n2ygk do you (or anyone else) have any ideas as to what I might be doing wrong?

Screenshot 2024-05-22 at 3 36 56 PM

Originally posted by @s1monj in #1092 (comment)

@n2ygk n2ygk changed the title I'm trying to achieve an Authorization Code with PKCE flow and public client for a Single Page web App (that can't keep a client_secret safe). I am using the latest release 2.4.0 but having the same issue described above. app without client_secret (still) not working? May 23, 2024
@n2ygk n2ygk added the bug label May 23, 2024
@n2ygk
Copy link
Member Author

n2ygk commented May 23, 2024

@s1monj the testapp2 screenshot shows a client secret. Are you sure it's blank?

@s1monj
Copy link

s1monj commented May 23, 2024

@n2ygk ahhhhh can't believe I didn't try that! That was all I needed thanks! I guess because the Client Secret is auto-populated by the UI, I was in the mindset that every app has a client secret, and it's just up to the "Client type" to determine if the client must send it or not. I never thought of saving a blank secret, and now it makes total sense. Really appreciate your help with this!

@n2ygk
Copy link
Member Author

n2ygk commented May 23, 2024

Phew. Glad that's all it was.

@n2ygk n2ygk closed this as completed May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants