-
Notifications
You must be signed in to change notification settings - Fork 84
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
Create Auth API #4
Conversation
475fd68
to
3b0d38e
Compare
076fc28
to
1562257
Compare
1562257
to
008a8d9
Compare
a1bbc60
to
d201935
Compare
d201935
to
bc1e11f
Compare
@@ -1,29 +1,81 @@ | |||
import React, { useMemo, useState } from "react"; | |||
import React, { useEffect, useMemo, useState } from "react"; | |||
import { persistCache } from "apollo-cache-persist"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that we want to pin sdk user to persisted cache
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I have added to the createSaleorCache()
function the code, which persists cache in local storage only if parameter persistCache
is set to true. Also, check out updated readme.md
file for a better explanation. Is it the right solution now?
d2ecb4f
to
9cf1a30
Compare
9cf1a30
to
195698a
Compare
df48e1b
to
7c9e331
Compare
It moves main auth functionality entirely to sdk.
It adds the following
useAuth()
hook to the SDK: