Authentication
Basic Auth
const clientID = "the-client-id"
const clientSecret = "the-secret-id"
const basicAuth = bas64_encode(url_encode(clientID) + ":" + url_encode(clientSecret))
const requestOptions = {
method: "POST",
headers: {
Authorization: "Basic " + basicAuth,
"Content-Type": "application/x-www-form-urlencoded",
},
body: "grant_type=client_credentials&scope=read",
}
fetch("https://your-project.projects.oryapis.com/oauth2/token", requestOptions)
.then((response) => response.json())
.then((data) => console.log(data))JWT Bearer Auth
Enhanced Security Authentication
Last updated