Start signing in with a provider
const url = 'http://localhost:8080/api/v1/auth/providers/example/authorize';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"redirectUri":"https://example.com","codeChallenge":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:8080/api/v1/auth/providers/example/authorize \ --header 'Content-Type: application/json' \ --data '{ "redirectUri": "https://example.com", "codeChallenge": "example" }'Returns the provider’s sign-in page. Open it in a browser, such as
ASWebAuthenticationSession. After signing in, the browser is sent to
redirectUri with a one-time code, or with error and
error_description when sign-in failed. Trade the code for a session
with exchangeSignInCode within 5
minutes. The person has 10 minutes to sign in at the provider.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
Where to send the browser after sign-in. Must start with the
server’s public URL or a prefix in CHEK_OIDC_REDIRECTS
(chek:// by default).
The base64url SHA-256 of a random PKCE code verifier (RFC 7636 S256), without padding.
Example generated
{ "redirectUri": "https://example.com", "codeChallenge": "example"}Responses
Section titled “Responses”The page to open.
object
The provider’s sign-in page.
Example generated
{ "url": "https://example.com"}The request was malformed.
object
Explains the problem to a developer.
Example
{ "code": "bad_request"}The resource does not exist.
object
Explains the problem to a developer.
Example
{ "code": "bad_request"}The sign-in provider couldn’t be reached (provider_unavailable).
object
Explains the problem to a developer.
Example
{ "code": "bad_request"}Too many sign-ins are in progress at once (too_many_sign_ins); try again in a few minutes.
object
Explains the problem to a developer.
Example
{ "code": "bad_request"}