-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { requireServerEnv } from "@/lib/helpers/env"; | ||
|
||
export const GET = () => { | ||
return Response.json({ | ||
clientId: requireServerEnv("FUSIONAUTH_CLIENT_ID"), | ||
authorizationEndpoint: `${requireServerEnv("FUSIONAUTH_URL")}/oauth2/authorize`, | ||
logoutEndpoint: `${requireServerEnv("FUSIONAUTH_URL")}/oauth2/logout`, | ||
logoutRedirect: requireServerEnv("HOST"), | ||
redirectUri: requireServerEnv("HOST"), | ||
}); | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { requireServerEnv } from "@/lib/helpers/env"; | ||
|
||
export const POST = async (req: Request) => { | ||
const data = await req.formData(); | ||
data.set("client_secret", requireServerEnv("FUSIONAUTH_CLIENT_SECRET")); | ||
const res = await fetch(`${requireServerEnv("FUSIONAUTH_URL")}/oauth2/token`, { | ||
method: "POST", | ||
body: data, | ||
}); | ||
return Response.json(await res.json()); | ||
}; |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.