liamcurry / passport-steam

Steam (OpenID) authentication strategy for Passport and Node.js.
MIT License
346 stars 103 forks source link

Failed to discover OP endpoint URL #124

Open ignissak opened 8 months ago

ignissak commented 8 months ago

I am using passport-team as my Strategy in my NestJS application. Everything was working fine yesterday but today I'm getting this error:

InternalOpenIDError: Failed to discover OP endpoint URL This error is thrown eventually from this line in node_modules\.pnpm\openid@2.0.11\node_modules\openid\openid.js:757:14: return callback({ message: 'No providers found for the given identifier' }, null);

I debugged the variables in passport-openid and it looks like authenticate is called two times. The first time there is no error, I have providerUrl and correct identifier (if I navigate to the providerUrl it is the correct url I should be redirected to). But the second the error is { message: 'No providers found for the given identifier' } and the providerUrl is null.

How come I am not redirected on the first call? This is my auth controller:

@Controller('auth')
export class AuthController {
    constructor(private readonly authService: AuthService) {}

    @Get('steam')
    @UseGuards(SteamGuard)
    steamLogin() {}
}