Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect generated authorization header with private client type #2

Closed
junwen-k opened this issue Jun 25, 2022 · 2 comments
Closed

Comments

@junwen-k
Copy link

Thank you for writing this passport.

I've noticed that the generated Authorization header is not working as expected.

const base64url = require('base64url');

const username = 'user';
const password = 'password';

console.log('Basic ' + base64url(`${username}:${password}`)); // Method implemented in this passport.
console.log('Basic ' + Buffer.from(`${username}:${password}`).toString('base64'));

Notice that the generated authorization header is different. Is this intentional or am I missing something? Thank you.

@florianmartens
Copy link
Owner

Oh sorry, it has been a minute since I checked this. But, you're right. The twitter api expects a base64 encoded string; not a base64-url-encoded string. This has not produced any errors on my end though. But I will address this soon.

@florianmartens
Copy link
Owner

florianmartens commented Dec 1, 2022

Closed #3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants