@@ -67,18 +67,6 @@ export interface BitbucketProfile {
67
67
* By default, Auth.js assumes that the Bitbucket provider is
68
68
* based on the [OAuth 2](https://www.rfc-editor.org/rfc/rfc6749.html) specification.
69
69
*
70
- * #### Registration
71
- *
72
- * - [Login](https://bitbucket.org/)
73
- * - [Workspaces](https://bitbucket.org/account/workspaces/)
74
- * - Settings > Workspace settings > OAuth consumers > Add consumer
75
- * Name: Auth.js,
76
- * Description: Auth.js,
77
- * Callback URL: https://example.com/api/auth/callback/bitbucket
78
- * Permissions: Account: Read Email Write
79
- * Click "Save"
80
- * Copy the "Key" and "Secret" to your `.env.local` file.
81
- *
82
70
* #### Resources
83
71
*
84
72
* - [Using OAuth on Bitbucket Cloud](https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud/)
@@ -110,29 +98,14 @@ export default function Bitbucket(
110
98
name : "Bitbucket" ,
111
99
type : "oauth" ,
112
100
authorization : {
113
- url : ` https://bitbucket.org/site/oauth2/authorize` ,
101
+ url : " https://bitbucket.org/site/oauth2/authorize" ,
114
102
params : {
115
103
response_type : "code" ,
116
104
scope : "account" ,
117
105
} ,
118
106
} ,
119
- token : {
120
- url : "https://bitbucket.org/site/oauth2/access_token" ,
121
- params : {
122
- grant_type : "authorization_code" ,
123
- } ,
124
- } ,
125
- userinfo : {
126
- url : "https://api.bitbucket.org/2.0/user" ,
127
- async request ( { tokens, provider } ) {
128
- return await fetch ( provider . userinfo ?. url as URL , {
129
- headers : {
130
- "Content-Type" : "application/json" ,
131
- Authorization : `Bearer ${ tokens . access_token } ` ,
132
- } ,
133
- } ) . then ( ( response ) => response . json ( ) )
134
- } ,
135
- } ,
107
+ token : "https://bitbucket.org/site/oauth2/access_token" ,
108
+ userinfo : "https://api.bitbucket.org/2.0/user" ,
136
109
profile ( profile ) {
137
110
return {
138
111
name : profile . display_name ?? profile . username ,
0 commit comments