authorizer icon indicating copy to clipboard operation
authorizer copied to clipboard

Issues with Auth0

Open dandanthedev opened this issue 2 years ago • 7 comments

Version: latest

Describe the bug

I am trying to authenticate with Auth0 using Authorizer as a login. The problem is that i am getting code missing from response from Auth0.

I am adding it as an enterprise and am using it in "back channel" mode because front channel doesnt work at all. i can see in the requests that its returning id_token, to make auth0 look for that i have to enable front channel mode. But if i wanna do that i also have to enable "response_mode form_post", and that breaks everything! Please advice.

Steps To Reproduce

  1. Setup Auth0
  2. Create an Enterprise Openid with the following settings: J2iTaFwADZ
  3. Try to authenticate using https://oauthdebugger.com/
  4. Get the error

Expected behavior

Successful authentication

Screenshots

https://user-images.githubusercontent.com/20974756/186492721-d68a2e13-d474-4339-b9fb-c8e7385d66a5.mp4 chrome_a69BHUzbTS

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser
  • chrome_AEtheTekA6

Additional context

Supplied everything in screenshots, i can provide more details if needed.

dandanthedev avatar Aug 24 '22 18:08 dandanthedev

@daanschenkel thank you for reporting this I will look into it 👍

lakhansamani avatar Aug 24 '22 18:08 lakhansamani

@daanschenkel consider using PKCE flow https://youtu.be/1hVfyyIHnlA

https://auth0.com/docs/get-started/authentication-and-authorization-flow/authorization-code-flow-with-proof-key-for-code-exchange-pkce

lakhansamani avatar Aug 24 '22 19:08 lakhansamani

@daanschenkel consider using PKCE flow https://youtu.be/1hVfyyIHnlA

https://auth0.com/docs/get-started/authentication-and-authorization-flow/authorization-code-flow-with-proof-key-for-code-exchange-pkce

Hi, thanks for the reply! The thing you have sent seems to be how to use auth0 in pcke, not the underlying auth provider. Please clarify a bit what i need to do if im not reading it correctly.

dandanthedev avatar Aug 25 '22 09:08 dandanthedev

@daanschenkel the steps you mentioned seem to work for me with query mode I suppose, though I am not sure what you have entered as input on step3

There is one issue that /authorize endpoint does not support POST method at the moment. I will create a separate issue for that and work on it.

Happy to jump on a call and help. Reach out to me on discord of authorizer :-)

lakhansamani avatar Aug 26 '22 05:08 lakhansamani

@daanschenkel can you try testing with authorizer 1.1.0 I have fixed one issue on /authorize endpoint which was causing issues while setting up the session.

lakhansamani avatar Aug 29 '22 03:08 lakhansamani

@daanschenkel can you try testing with authorizer 1.1.0 I have fixed one issue on /authorize endpoint which was causing issues while setting up the session.

@lakhansamani i've tried it again but am still getting the error { "error": "access_denied", "error_description": "code missing from response" }

dandanthedev avatar Sep 08 '22 21:09 dandanthedev

Interesting, I will have deeper look into this Thanks

lakhansamani avatar Sep 09 '22 03:09 lakhansamani

@daanschenkel can you share the values you are passing for https://oauthdebugger.com/?

lakhansamani avatar Oct 18 '22 17:10 lakhansamani

Hello,

i do have the same issue when using authorizer for mastodon :

E, [2022-10-25T20:47:05.482970 #1040307] ERROR -- omniauth: (openid_connect) Authentication failure! missing_code: OmniAuth::OpenIDConnect::MissingCodeError, OmniAuth::OpenIDConnect::MissingCodeError

skid9000 avatar Oct 25 '22 18:10 skid9000

@lakhansamani on oauthdebugger i have an error on the sso when trying form_post response mode :

SyntaxError: JSON.parse: unexpected non-whitespace character after JSON data at line 1 column 34 of the JSON data

skid9000 avatar Oct 25 '22 20:10 skid9000

@skid9000 thank you for reporting it. I was able to reproduce it and I am working it. There is draft PR in place. There is lot more to OpenID standard so this may take some more time.

Thank you for understanding

lakhansamani avatar Oct 26 '22 00:10 lakhansamani

@daanschenkel this is released as part of 1.1.28-rc.4 you can verify once. Thanks

lakhansamani avatar Nov 18 '22 05:11 lakhansamani