mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-03 05:45:04 +03:00
fix: use public callbacks for remote Google OAuth with custom creds
This commit is contained in:
@@ -6,6 +6,7 @@ import {
|
||||
exchangeTokens,
|
||||
requestDeviceCode,
|
||||
pollForToken,
|
||||
resolveBrowserOAuthRedirectUri,
|
||||
} from "@/lib/oauth/providers";
|
||||
import {
|
||||
createProviderConnection,
|
||||
@@ -80,7 +81,9 @@ export async function GET(
|
||||
const { searchParams } = new URL(request.url);
|
||||
|
||||
if (action === "authorize") {
|
||||
const redirectUri = searchParams.get("redirect_uri") || "http://localhost:8080/callback";
|
||||
const requestedRedirectUri =
|
||||
searchParams.get("redirect_uri") || "http://localhost:8080/callback";
|
||||
const redirectUri = resolveBrowserOAuthRedirectUri(provider, requestedRedirectUri);
|
||||
const authData = generateAuthData(provider, redirectUri);
|
||||
if (provider === "qoder" && !authData.authUrl) {
|
||||
return NextResponse.json({
|
||||
|
||||
Reference in New Issue
Block a user