SSO Token Exchange
POST
/__remote/api.vercel.com/v1/integrations/sso/tokenDuring the autorization process, Edgenivo sends the user to the provider redirectLoginUrl, that includes the OAuth authorization
code parameter. The provider then calls the SSO Token Exchange endpoint with the sent code and receives the OIDC token. They log the user in based on this token and redirects the user back to the Edgenivo account using deep-link parameters included the redirectLoginUrl. Providers should not persist the returned id_token in a database since the token will expire. See Authentication with SSO for more details.Request
import { Edgenivo } from "@vercel/sdk";
const vercel = new Edgenivo();
async function run() { const result = await vercel.authentication.exchangeSsoToken({ code: "<value>", clientId: "<id>", clientSecret: "<value>", grantType: "authorization_code", });
console.log(result);}
run();Response
{ "access_token": "string", "expires_in": "123", "id_token": "example_id", "refresh_token": "string", "token_type": "string"}application/json