diff --git a/src/runtime/server/lib/oauth/steam.ts b/src/runtime/server/lib/oauth/steam.ts index a0e73870..e93f9d23 100644 --- a/src/runtime/server/lib/oauth/steam.ts +++ b/src/runtime/server/lib/oauth/steam.ts @@ -39,14 +39,14 @@ export function defineOAuthSteamEventHandler({ config, onSuccess, onError }: OAu } const url = getRequestURL(event) - if (!query['openid.claimed_id']) { const redirectURL = config.redirectURL || getRequestURL(event).href + const realm = url.port ? `${url.protocol}//${url.hostname}:${url.port}` : `${url.protocol}//${url.hostname}` const steamOpenIdParams = { 'openid.ns': 'http://specs.openid.net/auth/2.0', 'openid.mode': 'checkid_setup', 'openid.return_to': redirectURL, - 'openid.realm': `${url.protocol}//${url.hostname}`, + 'openid.realm': realm, 'openid.identity': 'http://specs.openid.net/auth/2.0/identifier_select', 'openid.claimed_id': 'http://specs.openid.net/auth/2.0/identifier_select', }