@@ -67,18 +67,6 @@ export interface BitbucketProfile {
6767 * By default, Auth.js assumes that the Bitbucket provider is
6868 * based on the [OAuth 2](https://www.rfc-editor.org/rfc/rfc6749.html) specification.
6969 *
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- *
8270 * #### Resources
8371 *
8472 * - [Using OAuth on Bitbucket Cloud](https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud/)
@@ -110,37 +98,20 @@ export default function Bitbucket(
11098 name : "Bitbucket" ,
11199 type : "oauth" ,
112100 authorization : {
113- url : ` https://bitbucket.org/site/oauth2/authorize` ,
101+ url : " https://bitbucket.org/site/oauth2/authorize" ,
114102 params : {
115- response_type : "code" ,
116103 scope : "account" ,
117104 } ,
118105 } ,
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- } ,
106+ token : "https://bitbucket.org/site/oauth2/access_token" ,
107+ userinfo : "https://api.bitbucket.org/2.0/user" ,
136108 profile ( profile ) {
137109 return {
138110 name : profile . display_name ?? profile . username ,
139111 id : profile . account_id ,
140112 image : profile . links . avatar ?. href ,
141113 }
142114 } ,
143- issuer : "https://bitbucket.org" ,
144115 options : config ,
145116 style : {
146117 text : "#fff" ,
0 commit comments