UNPKG

payload-auth-plugin

Version:
33 lines (32 loc) 870 B
// src/providers/oauth2/atlassian.ts var algorithm = "oauth2"; var authorization_server = { issuer: "https://auth.atlassian.com", authorization_endpoint: "https://auth.atlassian.com/authorize", token_endpoint: "https://auth.atlassian.com/oauth/token", userinfo_endpoint: "https://api.atlassian.com/me" }; function AtlassianAuthProvider(config) { const { overrideScope, ...restConfig } = config; return { ...restConfig, id: "atlassian", authorization_server, name: "Atlassian", algorithm, scope: overrideScope ?? "read:me read:account", kind: "oauth", profile: (profile) => { return { sub: profile.account_id, name: profile.name, email: profile.email, picture: profile.picture }; } }; } var atlassian_default = AtlassianAuthProvider; export { atlassian_default as default };