providers/atlassian
AtlassianProfile
The returned user profile from Atlassian when using the profile callback.
Extends
Record
<string
,any
>
Properties
account_id
account_id: string;
The user’s atlassian account ID
email: string;
The user’s email
name
name: string;
The user name
picture
picture: string;
The user’s profile picture
default()
default(options): OAuthConfig<AtlassianProfile>
Setup
Callback URL
https://example.com/api/auth/callback/atlassian
Configuration
Import the provider and configure it in your Auth.js initialization file:
import Atlassian from "@auth/core/providers/atlassian"
...
providers: [
Atlassian({
clientId: env.AUTH_ATLASSIAN_ID,
clientSecret: env.AUTH_ATLASSIAN_SECRET,
}),
]
...
Configuring Atlassian
Follow these steps:
- From any page on developer.atlassian.com, select your profile icon in the top-right corner, and from the dropdown, select Developer console.
- Select your app from the list (or create one if you don’t already have one)
- Select Authorization in the left menu
- Next to OAuth 2.0 (3LO), select Configure (or Add for newly created app)
- Enter the Callback URL:
https://{YOUR_DOMAIN}/api/auth/callback/atlassian
- Click Save changes
- Select Settings in the left menu
- Access and copy your app’s Client ID and Secret
Then, create a .env
file in the project root add the following entries:
AUTH_ATLASSIAN_ID=<Client ID copied in step 8>
AUTH_ATLASSIAN_SECRET=<Secret copied in step 8>
Resources
Notes
The Atlassian provider comes with a default configuration. To override the defaults for your use case, check out customizing a built-in OAuth provider.
Help
If you think you found a bug in the default configuration, you can open an issue.
Auth.js strictly adheres to the specification and it cannot take responsibility for any deviation from the spec by the provider. You can open an issue, but if the problem is non-compliance with the spec, we might not pursue a resolution. You can ask for more help in Discussions.
Parameters
Parameter | Type |
---|---|
options | OAuthUserConfig <AtlassianProfile > |