diff --git a/src/strategy.ts b/src/strategy.ts index 8579a88..319f872 100644 --- a/src/strategy.ts +++ b/src/strategy.ts @@ -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'; diff --git a/test/strategy.test.ts b/test/strategy.test.ts index e3e9b38..e12c05d 100644 --- a/test/strategy.test.ts +++ b/test/strategy.test.ts @@ -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;