### ConsentKeys User Profile Example Source: https://consentkeys.com/docs This JSON object represents the pseudonymous user profile data returned by ConsentKeys after a successful authentication, including a stable 'sub' identifier and generated profile information. ```json { "sub": "user_a1b2c3d4e5f6a7b8", "name": "Clarence Muller", "email": "user_a1b2c3d4.ck_abc12@consentkeys.com", "email_verified": true, "preferred_username": "user_a1b2c3d4e5f6a7b8", "picture": "https://api.consentkeys.com/avatars/user_a1b2c3d4e5f6a7b8" } ``` -------------------------------- ### Initialize openid-client with ConsentKeys Source: https://consentkeys.com/docs Use the 'openid-client' library in Node.js to discover ConsentKeys' OIDC configuration and create a client instance. Replace placeholders with your actual client ID, secret, and redirect URI. ```javascript import { Issuer } from "openid-client"; const issuer = await Issuer.discover("https://api.consentkeys.com"); const client = new issuer.Client({ client_id: "ck_your_client_id", client_secret: "your_client_secret", redirect_uris: ["https://yourapp.com/callback"], }); ``` -------------------------------- ### Login and Create App via CLI Source: https://consentkeys.com/docs Use the ConsentKeys CLI to quickly log in and create a new application, obtaining a Client ID and Client Secret. ```bash npx consentkeys login ``` ```bash npx consentkeys apps create --name "My App" ``` -------------------------------- ### Configure Auth.js for ConsentKeys Source: https://consentkeys.com/docs Integrate ConsentKeys as an OIDC provider in your Auth.js configuration for NextAuth. Ensure your ConsentKeys Client ID and Secret are set as environment variables. ```javascript { id: "consentkeys", name: "ConsentKeys", type: "oidc", issuer: "https://api.consentkeys.com", clientId: process.env.CONSENTKEYS_CLIENT_ID, clientSecret: process.env.CONSENTKEYS_CLIENT_SECRET, } ``` -------------------------------- ### Register ConsentKeys with Authlib (Flask) Source: https://consentkeys.com/docs Configure Authlib in a Flask application to use ConsentKeys as the OAuth 2.0 provider. Specify the discovery URL and desired scopes. ```python oauth.register( name="consentkeys", server_metadata_url="https://api.consentkeys.com/.well-known/openid-configuration", client_id="ck_your_client_id", client_secret="your_client_secret", client_kwargs={"scope": "openid profile email"}, ) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.