when i login than i get redirected to "/" page but...
# support-questions-legacy
a
when i login than i get redirected to "/" page but i have set to redirect to "/create-organization" frontend config
Copy code
js

export function setRouter(router: ReturnType<typeof useRouter>, pathName: string) {
    routerInfo.router = router;
    routerInfo.pathName = pathName;
}
export const frontendConfig = (): SuperTokensConfig => {
    return {
        appInfo,
        recipeList: [
            ThirdPartyEmailPasswordReact.init({
                signInAndUpFeature: {
                    providers: [
                        ThirdPartyEmailPasswordReact.Google.init(),
                        ThirdPartyEmailPasswordReact.Github.init(),
                    ],
                },
                getRedirectionURL: async (context) => {
                    if (context.action === "SUCCESS") {
                        if (context.redirectToPath !== undefined) {
                            // we are navigating back to where the user was before they authenticated
                            return context.redirectToPath;
                        }
                        if (context.isNewPrimaryUser) {
                            // user signed up
                            redirectToAuth({ show: "signin" })
                            return ""
                        } else {
                            // user signed in
                            return "/create-organization"
                        }
                    } else {
                        redirectToAuth({ show: "signin" });
                        return ""
                    }
                },