Skip to content

Commit

Permalink
fix: update default authorization URL (#57)
Browse files Browse the repository at this point in the history
* update default authorizationURL

* update tests
  • Loading branch information
MuizNadeem authored Feb 6, 2025
1 parent 43316fe commit ef14afc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/strategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export class Strategy extends OAuth2Strategy {
const options = userOptions || {};
options.sessionKey = options.sessionKey || 'oauth:twitter';
const authorizationURL =
options.authorizationURL || 'https://twitter.com/i/oauth2/authorize';
options.authorizationURL || 'https://x.com/i/oauth2/authorize';
const tokenURL =
options.tokenURL || 'https://api.twitter.com/2/oauth2/token';

Expand Down
2 changes: 1 addition & 1 deletion test/strategy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ describe('issuing authorization request', function () {
it('should be redirected', function () {
const parsedUrl = new URL(url);

expect(parsedUrl.host).to.equal('twitter.com');
expect(parsedUrl.host).to.equal('x.com');
expect(parsedUrl.pathname).to.equal('/i/oauth2/authorize');
expect(parsedUrl.searchParams.get('response_type')).to.equal('code');
expect(parsedUrl.searchParams.get('code_challenge')).to.exist;
Expand Down

0 comments on commit ef14afc

Please sign in to comment.