curl --request GET \
--url https://accounts.eka.care/oauth2/authorizeimport requests
url = "https://accounts.eka.care/oauth2/authorize"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://accounts.eka.care/oauth2/authorize', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://accounts.eka.care/oauth2/authorize",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://accounts.eka.care/oauth2/authorize"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://accounts.eka.care/oauth2/authorize")
.asString();require 'uri'
require 'net/http'
url = URI("https://accounts.eka.care/oauth2/authorize")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"error": "invalid_grant",
"error_description": "The provided authorization grant is invalid, expired, or already used."
}Authorize User
Starts the OAuth 2.0 Authorization Code flow.
Open this endpoint in the user’s browser. Eka authenticates the user when
required and redirects the browser to the registered redirect_uri.
A successful redirect contains a short-lived, single-use authorization
code that your backend exchanges at /oauth2/token.
Eka grants a fixed scope set on this endpoint. Include it as the OAuth
scope query parameter:
openid profile email offline_access.
PKCE is optional. When using PKCE, use the S256 challenge method and
generate a new verifier for every authorization request.
curl --request GET \
--url https://accounts.eka.care/oauth2/authorizeimport requests
url = "https://accounts.eka.care/oauth2/authorize"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://accounts.eka.care/oauth2/authorize', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://accounts.eka.care/oauth2/authorize",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://accounts.eka.care/oauth2/authorize"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://accounts.eka.care/oauth2/authorize")
.asString();require 'uri'
require 'net/http'
url = URI("https://accounts.eka.care/oauth2/authorize")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"error": "invalid_grant",
"error_description": "The provided authorization grant is invalid, expired, or already used."
}code_challenge_method=S256 and generate a new verifier for every authorization request.
After authentication, Eka redirects the browser to your registered redirect_uri with a
single-use authorization code.
Your client application should verify state before exchanging the code. If your authorization
request includes a nonce, your client should verify it when validating the returned ID token.
scope query parameter:
openid profile email offline_access.Query Parameters
Use code for the Authorization Code flow.
code Client identifier issued by Eka.
Callback URL that receives the authorization response. It must exactly match a redirect URI registered for the client.
Fixed scope set for this endpoint:
openid profile email offline_access.
openid profile email offline_access Unpredictable value used by the client to prevent CSRF. Verify that the same value is returned to the callback. Use at least 8 characters.
8Unpredictable value that binds the client session to the ID token. Verify the returned ID token contains the same value.
Base64url-encoded SHA-256 digest of the PKCE code_verifier.
Required only when using PKCE.
PKCE transformation method. Use S256.
S256 Set to login to require the user to authenticate again.
login Maximum allowed age of the user's Eka authentication session, in
seconds. Eka requires authentication again when the session is older.
A value of 0 always requires authentication.
x >= 0Response
The browser is redirected to redirect_uri. On success, the query
contains code, state, and the granted scope. On an OAuth error,
it contains error, error_description, and state.
Was this page helpful?

