mirror of
https://github.com/diced/zipline.git
synced 2025-04-11 23:31:17 -05:00
fix: oidc: don't wish for a refresh token
This commit is contained in:
parent
0caa188aa3
commit
2130d113d4
1 changed files with 1 additions and 2 deletions
|
@ -60,14 +60,13 @@ async function handler({ code, host, state }: OAuthQuery, _logger: Logger): Prom
|
|||
|
||||
const json = await res.json();
|
||||
if (!json.access_token) return { error: 'No access token in response' };
|
||||
if (!json.refresh_token) return { error: 'No refresh token in response' };
|
||||
|
||||
const userJson = await oidcAuth.user(json.access_token, config.oauth.oidc.userinfoUrl!);
|
||||
if (!userJson) return { error: 'Failed to fetch user' };
|
||||
|
||||
return {
|
||||
access_token: json.access_token,
|
||||
refresh_token: json.refresh_token,
|
||||
refresh_token: json.refresh_token || null,
|
||||
username: userJson.preferred_username,
|
||||
user_id: userJson.sub,
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue