From 759eaa7536360f4dcb02dd23a4843b163694c7e5 Mon Sep 17 00:00:00 2001 From: Nikki Kang Date: Thu, 7 Jul 2022 23:12:21 +0200 Subject: [PATCH] fix oauth user ids - client side --- packages/web/src/pages/oauth-login-page/OAuthLoginPage.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/web/src/pages/oauth-login-page/OAuthLoginPage.tsx b/packages/web/src/pages/oauth-login-page/OAuthLoginPage.tsx index 5290a456a1..732f9616fb 100644 --- a/packages/web/src/pages/oauth-login-page/OAuthLoginPage.tsx +++ b/packages/web/src/pages/oauth-login-page/OAuthLoginPage.tsx @@ -25,6 +25,7 @@ import AudiusBackend from 'services/AudiusBackend' import { make, useRecord } from 'store/analytics/actions' import { getCreatorNodeIPFSGateways } from 'utils/gatewayUtil' import { ERROR_PAGE, SIGN_UP_PAGE } from 'utils/route' +import { encodeHashId } from 'utils/route/hashIds' import { signOut } from 'utils/signOut' import styles from '../styles/OAuthLoginPage.module.css' @@ -290,14 +291,15 @@ export const OAuthLoginPage = () => { } } const timestamp = Math.round(new Date().getTime() / 1000) + const userId = encodeHashId(account?.user_id) const response = { - userId: account?.user_id, + userId, email, name: account?.name, handle: account?.handle, verified: account?.is_verified, profilePicture, - sub: account?.user_id, + sub: userId, iat: timestamp } const header = base64url.encode(