Skip to content

Commit fbaa8be

Browse files
committed
chore(callback): callback redirect URI using getRedirectUri utils
1 parent 15b8c81 commit fbaa8be

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/runtime/callback.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import type { CookieSerializeOptions } from 'cookie-es'
1212
import {
1313
getEnv,
1414
getHomeURL,
15+
getRedirectUri,
1516
} from '../core/utils'
1617
import { getClient } from '../core/client'
1718

@@ -29,7 +30,7 @@ export default defineEventHandler(async (event) => {
2930
const homeURL = getHomeURL(profile, state.redirect)
3031
const access = await client.getToken({
3132
code : query.code as string,
32-
redirect_uri: getEnv(profile, 'REDIRECT_URI'),
33+
redirect_uri: getRedirectUri(event, profile),
3334
scope : getEnv(profile, 'SCOPE') || 'public read',
3435
})
3536

0 commit comments

Comments
 (0)