1
0
Fork 0
mirror of synced 2024-09-10 14:46:56 +12:00
appwrite/app/sdks/node/docs/examples/auth/oauth-callback.md

19 lines
347 B
Markdown
Raw Normal View History

2019-09-13 04:20:03 +12:00
const sdk = require('node-appwrite');
2019-06-10 06:13:55 +12:00
2019-09-13 04:20:03 +12:00
// Init SDK
let client = new Auth.Client();
let auth = new sdk.Auth(client);
client
2019-06-10 06:13:55 +12:00
setProject('')
setKey('')
;
2019-09-13 04:20:03 +12:00
let promise = auth.oauthCallback('[PROJECT_ID]', 'bitbucket', '[CODE]');
2019-06-10 06:13:55 +12:00
promise.then(function (response) {
console.log(response);
}, function (error) {
console.log(error);
});