future-doctor-89396
01/24/2023, 11:47 AMjs
fetch("<http://localhost:4000/userinfo>", {
"headers": {
"accept": "application/json, application/jwt",
"accept-language": "fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7",
"authorization": "Bearer ory_at_AbC123.xYz789", // this is the token i get from the token endpoint
"sec-ch-ua": "\"Not_A Brand\";v=\"99\", \"Google Chrome\";v=\"109\", \"Chromium\";v=\"109\"",
"sec-ch-ua-mobile": "?0",
"sec-ch-ua-platform": "\"Windows\"",
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
"sec-fetch-site": "same-site"
},
"referrer": "<http://localhost:3000/>",
"referrerPolicy": "strict-origin-when-cross-origin",
"body": null,
"method": "GET",
"mode": "cors",
"credentials": "include"
});
and i get this response:
HTTP/1.1 401 Unauthorized
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: http://localhost:3000
Access-Control-Expose-Headers: Set-Cookie, Cache-Control, Expires, Last-Modified, Pragma, Content-Length, Content-Language, Content-Type
Alt-Svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400
Cache-Control: private, no-cache, no-store, must-revalidate
Cf-Cache-Status: DYNAMIC
Cf-Ray: 78e864eb6c03d6b2-CDG
Content-Type: application/json
Date: Tue, 24 Jan 2023 112257 GMT
Server: cloudflare
Set-Cookie: __cflb=0pg1PgkZtX3ARcYPXvJZm51VR4Nt1Fp96U3smBAj; Path=/; HttpOnly; SameSite=Lax
Strict-Transport-Security: max-age=0;
Vary: Origin
Vary: Origin
Www-Authenticate: Bearer error="request_unauthorized",error_description="The request could not be authorized. Check that you provided valid credentials in the right format."
Content-Length: 155
{"error":"request_unauthorized","error_description":"The request could not be authorized. Check that you provided valid credentials in the right format."}
Did i miss something in my request for this to append ?proud-plumber-24205
01/24/2023, 12:03 PM/userinfo
endpoint. https://www.ory.sh/docs/reference/api#tag/oidc/operation/getOidcUserInfofuture-doctor-89396
01/24/2023, 12:14 PMfuture-doctor-89396
01/24/2023, 12:14 PMfuture-doctor-89396
01/25/2023, 8:26 AM