-
Notifications
You must be signed in to change notification settings - Fork 102
Closed
Description
Hello, I'm trying to use the SDK to get a user's token and store it so I can fetch and use it later. Everything works as expected but the OAuth2User.requestAccessToken method doesn't return the requested token it rather just updates the OAuth2User class using the OAuth2User.updateToken method.
Expected behavior
It will be great if the OAuth2User.requestAccessToken method can return the requested token so it can be stored externally.
Actual behavior
The OAuth2User.requestAccessToken method doesn't return the requested token it rather just updates the OAuth2User class using the OAuth2User.updateToken method.
Steps to reproduce the behavior
const authClient = new auth.OAuth2User({
client_id: client_id,
client_secret: client_secret,
callback: "callback_url",
scopes: ["tweet.write", "users.read", "offline.access"],
});
let Token = await authClient.requestAccessToken(code);
console.log(Token)
this gives an empty response
Metadata
Metadata
Assignees
Labels
No labels