File tree Expand file tree Collapse file tree
foundry/packages/backend/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ export async function startBackend(options: BackendStartOptions = {}): Promise<v
143143 return Response . redirect ( result . url , 302 ) ;
144144 } ) ;
145145
146- app . get ( "/api/rivet/app/auth/github/callback" , async ( c ) => {
146+ const handleGithubAuthCallback = async ( c : any ) => {
147147 const code = c . req . query ( "code" ) ;
148148 const state = c . req . query ( "state" ) ;
149149 if ( ! code || ! state ) {
@@ -152,7 +152,10 @@ export async function startBackend(options: BackendStartOptions = {}): Promise<v
152152 const result = await appWorkspaceAction ( async ( workspace ) => await workspace . completeAppGithubAuth ( { code, state } ) ) ;
153153 c . header ( "x-foundry-session" , result . sessionId ) ;
154154 return Response . redirect ( result . redirectTo , 302 ) ;
155- } ) ;
155+ } ;
156+
157+ app . get ( "/api/rivet/app/auth/github/callback" , handleGithubAuthCallback ) ;
158+ app . get ( "/api/auth/callback/github" , handleGithubAuthCallback ) ;
156159
157160 app . post ( "/api/rivet/app/sign-out" , async ( c ) => {
158161 const sessionId = await resolveSessionId ( c ) ;
You can’t perform that action at this time.
0 commit comments