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

EPIC: Version 2.0 #204

Open
8 tasks
soofstad opened this issue Nov 4, 2024 · 5 comments
Open
8 tasks

EPIC: Version 2.0 #204

soofstad opened this issue Nov 4, 2024 · 5 comments

Comments

@soofstad
Copy link
Owner

soofstad commented Nov 4, 2024

A list of some things that can be done and included in a 2.0 release. Some are breaking, some are not. Most are up for discussion.

  • No auto redirect during session
  • Remove renamed/unused parameters
  • Require onRefreshTokenExpire()
  • Require handleRefreshError() - maybe(?)
  • Rethink AuthContext interface (isAuthenticated, isLoading, etc.)
  • Check for using Context outside of Provider
  • Offer a useAuthContext() - (?)
  • No/reduce usage of positional arguments (ex. logIn(undefine, undefine, True))
Copy link

github-actions bot commented Jan 3, 2025

Stale issue message

@dburles
Copy link

dburles commented Jan 7, 2025

+1 for auth context API outside of react, primarily token information.

@sebastianvitterso
Copy link
Collaborator

sebastianvitterso commented Jan 27, 2025

I don't like that we sometimes have to recommend users to write stuff like logIn(undefined, undefined, 'popup'). Not a fan of the undefineds there. I propose for v2:

So

type LoginConfig = {
  state?: string
  additionalParameters?: TPrimitiveRecord
  method?: 'redirect' | 'popup' | 'replaced-redirect'
}

function logIn (config?: LoginConfig) {}

@soofstad
Copy link
Owner Author

@dburles
Could you specify what you mean by "auth context API outside of react"?
ReactContext is the only API we have now. Not sure what other API's you'd need in a React package

@dburles
Copy link

dburles commented Jan 27, 2025

@soofstad I have data fetching logic that lives outside of React context which relies on the access token. Currently to get the token I am grabbing it directly from local storage, which works, but feels like a bit of a hack.

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

No branches or pull requests

3 participants