Persist Google picture and sub on login via setProfile.
Store profile fields from the verified ID token and read picture from the DB on authenticated requests.
This commit is contained in:
@@ -31,3 +31,8 @@ export async function setSelectedCompany(authId, companyId) {
|
||||
const store = await getStore();
|
||||
await store.google_auth.setSelectedCompany(authId, companyId);
|
||||
}
|
||||
|
||||
export async function setProfile(authId, { picture = null, sub = null } = {}) {
|
||||
const store = await getStore();
|
||||
await store.google_auth.setProfile(authId, { picture, sub });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user