-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(auth) - session change in client 🚑
Session change was not visible on client as Auth.js login and signout stopped refreshing the page solution to implement Session provider with getSession() rather than auth() refer: nextauthjs/next-auth#10016 (comment) also fixed Skeleton Lint issues in Loading 🚨
- Loading branch information
1 parent
3f6cc48
commit dd8c8b8
Showing
5 changed files
with
79 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,17 @@ | ||
'use client' | ||
import { logout } from '@/server/actions/auth' | ||
|
||
|
||
|
||
const Signout = () => { | ||
return <button onClick={() => logout()}>signout</button> | ||
return ( | ||
<button | ||
onClick={async () => { | ||
await logout() | ||
location.reload() | ||
}} | ||
> | ||
signout | ||
</button> | ||
) | ||
} | ||
|
||
export default Signout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters