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

It's could be very helpful to add a persist store way #22

Closed
jetaix opened this issue May 9, 2020 · 2 comments
Closed

It's could be very helpful to add a persist store way #22

jetaix opened this issue May 9, 2020 · 2 comments

Comments

@jetaix
Copy link

jetaix commented May 9, 2020

How can I with this amazing boilerplate, use a authentification persist way my token?

Maybe add a feature like redux-persist ?

In my case, I need to persist my token in order to have a authentication system, routing persistence, maybe I'm not aware of a other way with the actual stack, but when i search "persist" in your documentation, I think no

Please let me know if you have any recommendation about this.

@Can-Sahin
Copy link
Member

So I guess the problem here is saving the auth tokens or any credentials right? Normally the client libs you are using handles that. Are you doing the auth flow manually without any 3rd party lib? Even then redux-persist isn't the solution in my opinion. You have to create a way to store them in local storage (of course securely) which that auth libs are doing very nicely. I suggest you don't reinvent the wheel here and use a lib.

Auth is a very big subject and there are dozens of ways and libs to do that. I have used AWS Cognito in many projects and it works super smooth and very easy. You don't deal with tokens etc...

Boilerplate cannot be customized for such cases. Its very user-specific. You can try redux-persist for sure but I'm sure there would be an easier way than that for saving tokens. I'm soon gonna create another repo for examples and tutorials build on this boilerplate like Auth with Cognito, Animations with this and that so on....So that, common web app scenarios will be available to check.

@manemao
Copy link

manemao commented Dec 9, 2020

hey.
I tried to add redux-persist in dozen ways to this framework and none of them works. besides of what other choices may developers have in different cases I think it's up to them to choose what lib to use.
here is 3 issues about persisting redux state here and cause of popularity of this between react developers that use redux, I suppose that adding some examples and tutorial would be be very useful. hence with cases that I tried I guess somethings really wrong with persisting redux in this framework. If I'm wrong please add an working example and prove it or accept the fact.
It's not a to-do request. just proposal for pro work on this amazing framework.
tnx for this useful framework anyway.

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