Skip to content

Commit 4df6553

Browse files
committed
fix: set user oauth app
1 parent 67abc89 commit 4df6553

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/context/App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,8 @@ export const AppProvider = ({ children }: { children: ReactNode }) => {
171171
async (data: LoginOAuthAppOptions) => {
172172
const { authOptions, authCode } = await authGitHub(data);
173173
const { token, hostname } = await getToken(authCode, authOptions);
174-
const updatedAuth = addAccount(auth, 'OAuth App', token, hostname);
174+
const user = await getUserData(token, hostname);
175+
const updatedAuth = addAccount(auth, 'OAuth App', token, hostname, user);
175176
setAuth(updatedAuth);
176177
saveState({ auth: updatedAuth, settings });
177178
},
@@ -181,7 +182,6 @@ export const AppProvider = ({ children }: { children: ReactNode }) => {
181182
const loginWithPersonalAccessToken = useCallback(
182183
async ({ token, hostname }: LoginPersonalAccessTokenOptions) => {
183184
await headNotifications(hostname, token);
184-
185185
const user = await getUserData(token, hostname);
186186
const updatedAuth = addAccount(
187187
auth,

0 commit comments

Comments
 (0)