Providers: Chess.com #12615
devashish2024
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Goals
Non-Goals
No response
Background
There should be an auth provider for Chess.com. Remember, to get Chess.com OAuth access, you have to apply for them.
As well as, they may or may not provide Client Secret. I wonder why, but when I requested, they gave a client ID and specificed the allowed redirect URIs and said there is no need of client secret but therefore keep it safe.
Proposal
Visit here for the official tutorial to setup Chess.com OAuth. I might re-documentate it in my own words here with some snippets to make things easier.
Chess.com OAuth Process
1. Generate a code verifier and challenge
Code verifier can be generated in way like:
Similarly, code challenge can be generated from code verifier:
2. Send an authentication request to Chess.com
code
for the default authorization flow.openid
scope in order to obtain ID token.code_verifier
that will be used as a challenge during authorization code exchange.code_verifier
for thecode_challenge
parameter. Must beS256
.Send a authentication request to
https://oauth.chess.com/authorize
with these URL parameters.For this, we could assume these default URL parameters:
?response_type=code&scope=openid+profile&code_challenge_method=S256
and then the client_id, redirect uri, code_challenge & state.3. User approves authentication request
No developer action required here.
4. User is redirected to
redirect_uri
The user will be redirected to the redirect_uri with a
code
parameter in URL and anstate
if it was provided in the first step.5. Exchange authorization code
authorization_code
Beta Was this translation helpful? Give feedback.
All reactions