providers/bitbucket
BitbucketProfile
See
https://developer.atlassian.com/cloud/bitbucket/rest/api-group-users/#api-user-get
Properties
account_id
account_id: string;
account_status
account_status: string;
created_on
created_on: string;
display_name
display_name: string;
has_2fa_enabled
has_2fa_enabled: null | boolean;
is_staff
is_staff: boolean;
links
links: Record<LiteralUnion<
| "html"
| "self"
| "avatar"
| "repositories"
| "snippets"
| "hooks", string>, {
href: string;
}>;
location
location: null | string;
nickname
nickname: string;
type
type: string;
username
username: string;
uuid
uuid: string;
default()
default(config): OAuthConfig<BitbucketProfile>
Setup
Callback URL
https://example.com/api/auth/callback/bitbucket
Configuration
import { Auth } from "@auth/core"
import Bitbucket from "@auth/core/providers/bitbucket"
const request = new Request(origin)
const response = await Auth(request, {
providers: [
Bitbucket({
clientId: process.env.BITBUCKET_CLIENT_ID,
clientSecret: process.env.BITBUCKET_CLIENT_SECRET,
})
],
})
Notes
By default, Auth.js assumes that the Bitbucket provider is based on the OAuth 2 specification.
Registration
- Login
- Workspaces
- Settings > Workspace settings > OAuth consumers > Add consumer
Name: Auth.js,
Description: Auth.js,
Callback URL: https://example.com/api/auth/callback/bitbucket
Permissions: Account: Read Email Write
Click “Save”
Copy the “Key” and “Secret” to your
.env.local
file.
Resources
💡
The Bitbucket provider comes with a default configuration. To override the defaults for your use case, check out customizing a built-in OAuth provider.
Disclaimer 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 |
---|---|
config | OAuthUserConfig <BitbucketProfile > |