Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: allow useLogout without authModalContext #972

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

dphilipson
Copy link
Contributor

@dphilipson dphilipson commented Sep 18, 2024

useLogout does not depend on UI components and now will no longer throw an error when used outside an AuthModalProvider.`


PR-Codex overview

The focus of this PR is to refactor the authentication context handling by introducing an optional context hook for better flexibility.

Detailed summary

  • Introduces useOptionalAuthContext hook for optional authentication context handling
  • Updates useLogout hook to use useOptionalAuthContext instead of useAuthContext

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

vercel bot commented Sep 18, 2024

You must have Developer access to commit code to Alchemy on Vercel. If you contact an administrator and receive Developer access, commit again to see your changes.

Learn more: https://vercel.com/docs/accounts/team-members-and-roles/access-roles#team-level-roles

`useLogout` does not depend on UI components and now will no longer
throw an error when used outside an `AuthModalProvider`.`
@dphilipson dphilipson force-pushed the dp/use-logout-without-modal-context branch from a2ec3b4 to d62f79b Compare September 18, 2024 20:55
@dphilipson dphilipson merged commit 8175962 into main Sep 18, 2024
3 of 5 checks passed
@dphilipson dphilipson deleted the dp/use-logout-without-modal-context branch September 18, 2024 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants