👔 (oauth) add callback URI options
provides the option to define a callback URI following a request from the frontend; if not defined, it will automatically use the backend's default URI.
This commit is contained in:
@ -2,9 +2,9 @@ import * as arctic from "arctic";
|
||||
import { githubProvider } from "../../providers/github.provider";
|
||||
import { AppError } from "../../../../helpers/error/instances/app";
|
||||
|
||||
export const githubRequestService = async () => {
|
||||
export const githubRequestService = async (callbackURI?: string) => {
|
||||
try {
|
||||
const github = githubProvider();
|
||||
const github = githubProvider(callbackURI);
|
||||
const state = arctic.generateState();
|
||||
const scopes = ["user:email"];
|
||||
const url = github.createAuthorizationURL(state, scopes);
|
||||
|
||||
Reference in New Issue
Block a user