sarahmiller321
sarahmiller321
TTCTheo's Typesafe Cult
Created by sarahmiller321 on 5/1/2023 in #questions
Good articles on auth?
Curious how auth works in bigger companies, any articles would be helpful
2 replies
TTCTheo's Typesafe Cult
Created by sarahmiller321 on 4/25/2023 in #questions
Immediately prompting for signin
currently I have this in home:
const Home: NextPage = () => {
const { data: sessionData } = useSession();

React.useEffect(() => {
console.log(sessionData)
if(!sessionData) {
signIn()
} else {
signOut()
}
}, [])
const Home: NextPage = () => {
const { data: sessionData } = useSession();

React.useEffect(() => {
console.log(sessionData)
if(!sessionData) {
signIn()
} else {
signOut()
}
}, [])
but this is not working, I would like the user to sign in as soon as they hit the page and keep them logged in, however when they sign in, it asks them to sign again... always in a loop
14 replies