@volr/react 0.1.7 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +3 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -5
- package/dist/index.js.map +1 -1
- package/package.json +2 -3
package/dist/index.cjs
CHANGED
|
@@ -1884,7 +1884,7 @@ function createAxiosInstance(baseUrl, apiKey) {
|
|
|
1884
1884
|
// src/hooks/useVolrLogin.ts
|
|
1885
1885
|
function useVolrLogin() {
|
|
1886
1886
|
const { config, setUser } = useVolr();
|
|
1887
|
-
const {
|
|
1887
|
+
const { setAccessToken } = useInternalAuth();
|
|
1888
1888
|
const toVolrUser = react.useCallback((u) => {
|
|
1889
1889
|
return {
|
|
1890
1890
|
id: u.id,
|
|
@@ -1952,7 +1952,6 @@ function useVolrLogin() {
|
|
|
1952
1952
|
);
|
|
1953
1953
|
}
|
|
1954
1954
|
setAccessToken(accessToken);
|
|
1955
|
-
await refreshAccessToken();
|
|
1956
1955
|
if (userFromServer) {
|
|
1957
1956
|
setUser(toVolrUser(userFromServer));
|
|
1958
1957
|
} else {
|
|
@@ -1966,7 +1965,7 @@ function useVolrLogin() {
|
|
|
1966
1965
|
accessToken
|
|
1967
1966
|
};
|
|
1968
1967
|
},
|
|
1969
|
-
[api,
|
|
1968
|
+
[api, setAccessToken, setUser, toVolrUser]
|
|
1970
1969
|
);
|
|
1971
1970
|
const handleSocialLogin = react.useCallback(
|
|
1972
1971
|
async (provider) => {
|
|
@@ -2014,7 +2013,6 @@ function useVolrLogin() {
|
|
|
2014
2013
|
);
|
|
2015
2014
|
}
|
|
2016
2015
|
setAccessToken(accessToken);
|
|
2017
|
-
await refreshAccessToken();
|
|
2018
2016
|
if (userFromServer) {
|
|
2019
2017
|
setUser(toVolrUser(userFromServer));
|
|
2020
2018
|
}
|
|
@@ -2034,7 +2032,7 @@ function useVolrLogin() {
|
|
|
2034
2032
|
throw error;
|
|
2035
2033
|
}
|
|
2036
2034
|
},
|
|
2037
|
-
[api,
|
|
2035
|
+
[api, setAccessToken, setUser, toVolrUser]
|
|
2038
2036
|
);
|
|
2039
2037
|
const handlePasskeyComplete = react.useCallback(async () => {
|
|
2040
2038
|
}, []);
|