mirror of
https://github.com/SrIzan10/next-auth.git
synced 2026-05-01 10:55:20 +00:00
fix: follow up allow EndpointRequest to return void type
This commit is contained in:
@@ -122,7 +122,7 @@ export async function handleOAuth(
|
||||
throw new Error("TODO: Handle www-authenticate challenges as needed")
|
||||
}
|
||||
|
||||
let profile: Profile
|
||||
let profile: Profile = {}
|
||||
let tokens: TokenSet & Pick<Account, "expires_at">
|
||||
|
||||
if (provider.type === "oidc") {
|
||||
@@ -153,7 +153,8 @@ export async function handleOAuth(
|
||||
}
|
||||
|
||||
if (userinfo?.request) {
|
||||
profile = await userinfo.request({ tokens, provider })
|
||||
const _profile = await userinfo.request({ tokens, provider })
|
||||
if (_profile instanceof Object) profile = _profile
|
||||
} else if (userinfo?.url) {
|
||||
const userinfoResponse = await o.userInfoRequest(
|
||||
as,
|
||||
|
||||
Reference in New Issue
Block a user