otrojka
otrojka
WWasp-lang
Created by otrojka on 7/30/2024 in #🙋questions
Github Oauth additional query parameters
Thanks Vinny 🙏 Finally I made it work using the OnBeforeOAuthRedirectHook from newly introduced AuthHooks
import type { OnBeforeOAuthRedirectHook } from 'wasp/server/auth'

export const onBeforeOAuthRedirect: OnBeforeOAuthRedirectHook = async ({
url,
uniqueRequestId,
prisma,
req,
}) => {
const redirectUri = "http://localhost:3001/auth/github/callback"
url.searchParams.append('redirect_uri', redirectUri);
return { url }
}
import type { OnBeforeOAuthRedirectHook } from 'wasp/server/auth'

export const onBeforeOAuthRedirect: OnBeforeOAuthRedirectHook = async ({
url,
uniqueRequestId,
prisma,
req,
}) => {
const redirectUri = "http://localhost:3001/auth/github/callback"
url.searchParams.append('redirect_uri', redirectUri);
return { url }
}
I want to use single Github Oauth App for multiple sites. Because I am using authorization on documentation site as well (on different domain). Moreover Github only support single callback domain which can be only slightly modified using redirect_uri.
8 replies
WWasp-lang
Created by otrojka on 6/29/2024 in #🙋questions
Dependency issue with fly.io server deploy
Yes, but I call it a workaround. I have created a new blank wasp project and deployed it using the wasp cli. It worked so I have migrated my source code into newly generated project. And error disappeared 🙂
14 replies
WWasp-lang
Created by otrojka on 6/29/2024 in #🙋questions
Dependency issue with fly.io server deploy
@kapa.ai I have rephrased my question
14 replies