Joshkop
Joshkop
Explore posts from servers
KKinde
Created by Joshkop on 8/30/2024 in #💻┃support
Use callbacks_url with and without intl18 subdomains
Hello, Im using nextintls subdomain routing for in18 But if users try to login from a in18 subdomain like "de.domain.com" instead of "domain.com" I get the sate flow not expected error Since its the same nextjs app for all subdomains, I cant add the callback url dynamicly on build time Is the only way now using wildcards? If so do I just need to set these envs:
KINDE_POST_LOGIN_REDIRECT_URL=https://*.domain.com
KINDE_POST_LOGOUT_REDIRECT_URL=https://*.domain.com
KINDE_POST_LOGIN_REDIRECT_URL=https://*.domain.com
KINDE_POST_LOGOUT_REDIRECT_URL=https://*.domain.com
or do i also set KINDE_SITE_URL to the wildcard ? What happens then to the normal domain at "domain.com" Since it is not a subdomain does that even work still?
10 replies
KKinde
Created by Joshkop on 8/25/2024 in #💻┃support
Custom Sign In | React ref for LoginLink || login() function in NextJS SDK
No description
7 replies
KKinde
Created by Joshkop on 7/31/2024 in #💻┃support
Loosing session after reload
Im using nextjs with trpc and since yesterday im having the problem that i loose the session when i reload the page. Using login again instantly gives me back the session I've allready updated to kinde-auth-nextjs 2.3.6 Also idk if that is related: The Session Cookies expiry date are all 2 days in the past
5 replies
KKinde
Created by Joshkop on 7/3/2024 in #💻┃support
Loosing auth after rerender in "use client" componenent
I have a nextjs client component in hwich i want to conditionaly show if the user is logged in or not On the first render everything works, but after that it rerenders and isAuthenticated is false I can't use the server auth here cause the parent component is client allready Why am i loosing auth on rerender ?
"use client"

import {LoginLink, LogoutLink, RegisterLink} from "@kinde-oss/kinde-auth-nextjs/components";
import {useTranslations} from "next-intl";

import styles from "./loginButtons.module.scss"
import {useKindeBrowserClient} from "@kinde-oss/kinde-auth-nextjs";




const LoginButtons = () => {
const t = useTranslations("login")
const {isAuthenticated} = useKindeBrowserClient()
console.log("auth: "+isAuthenticated)
return (
<div className={styles.navButtons}>
{ isAuthenticated ?
<LoginLink>
<i className="fa-solid fa-user-plus" aria-hidden></i>
<span>{t("sign_in")}</span>
</LoginLink>
:
<LogoutLink>
<i className="fa-solid fa-user-plus" aria-hidden></i>
<span>{t("logout")}</span>
</LogoutLink>
}
<RegisterLink>
<i className="fa-solid fa-user-plus" aria-hidden></i>
<span>{t("signup")}</span>
</RegisterLink>
</div>
);
}
export default LoginButtons
"use client"

import {LoginLink, LogoutLink, RegisterLink} from "@kinde-oss/kinde-auth-nextjs/components";
import {useTranslations} from "next-intl";

import styles from "./loginButtons.module.scss"
import {useKindeBrowserClient} from "@kinde-oss/kinde-auth-nextjs";




const LoginButtons = () => {
const t = useTranslations("login")
const {isAuthenticated} = useKindeBrowserClient()
console.log("auth: "+isAuthenticated)
return (
<div className={styles.navButtons}>
{ isAuthenticated ?
<LoginLink>
<i className="fa-solid fa-user-plus" aria-hidden></i>
<span>{t("sign_in")}</span>
</LoginLink>
:
<LogoutLink>
<i className="fa-solid fa-user-plus" aria-hidden></i>
<span>{t("logout")}</span>
</LogoutLink>
}
<RegisterLink>
<i className="fa-solid fa-user-plus" aria-hidden></i>
<span>{t("signup")}</span>
</RegisterLink>
</div>
);
}
export default LoginButtons
2 replies
TtRPC
Created by Joshkop on 6/25/2024 in #❓-help
Component suspends/rerenders on cached querykey
I've been trying to fix this issue for ours but dont get ahead I have a query which takes in a string literal value as an input This input is changed by the component prop (Which happens, when in the parent component the select input changes) When the prop first changes to a specifiy key everything works fine. The suspend fallback is shown until the data arrives Also on changing to a prop/key which wasnt cached/loaded yet But as soon as I go back to one which was already loaded the cached values are shown first, then the suspend boundary is triggered and then the same data which was in the cache is rendered again Google said alot about React Strict mode but neither disabling it or trying in prod helped Any tips on where to look for the issue ?
4 replies