Skip to content

Commit ef14afc

Browse files
authored
fix: update default authorization URL (#57)
* update default authorizationURL * update tests
1 parent 43316fe commit ef14afc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/strategy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export class Strategy extends OAuth2Strategy {
9393
const options = userOptions || {};
9494
options.sessionKey = options.sessionKey || 'oauth:twitter';
9595
const authorizationURL =
96-
options.authorizationURL || 'https://twitter.com/i/oauth2/authorize';
96+
options.authorizationURL || 'https://x.com/i/oauth2/authorize';
9797
const tokenURL =
9898
options.tokenURL || 'https://api.twitter.com/2/oauth2/token';
9999

test/strategy.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ describe('issuing authorization request', function () {
6060
it('should be redirected', function () {
6161
const parsedUrl = new URL(url);
6262

63-
expect(parsedUrl.host).to.equal('twitter.com');
63+
expect(parsedUrl.host).to.equal('x.com');
6464
expect(parsedUrl.pathname).to.equal('/i/oauth2/authorize');
6565
expect(parsedUrl.searchParams.get('response_type')).to.equal('code');
6666
expect(parsedUrl.searchParams.get('code_challenge')).to.exist;

0 commit comments

Comments
 (0)