Skip to content

Commit b8c1cc9

Browse files
committed
minor changes
1 parent 03564be commit b8c1cc9

4 files changed

Lines changed: 5 additions & 13 deletions

File tree

.github/workflows/npmpublish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Publish Package
33
on:
44
push:
55
branches:
6-
- master
6+
- main
77

88
jobs:
99
publish-npm:

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
},
5353
"peerDependencies": {
5454
"react": ">=16.13.1",
55-
"react-native-auth0": ">=2.5.6"
55+
"react-native-auth0": ">=2.10.0"
5656
},
5757
"husky": {
5858
"hooks": {

src/provider.tsx

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable @typescript-eslint/no-empty-function */
21
import * as React from 'react';
32
import jwt_decode from 'jwt-decode';
43
import { UserInfo, Credentials } from 'react-native-auth0';
@@ -60,7 +59,6 @@ export const AuthProvider: React.FC<AuthProviderProps> = ({ children, config })
6059

6160

6261
const login = React.useCallback(async () => {
63-
console.log('calling lodgin');
6462
// to have more control when dispatching avoid using the createAction here
6563
setLoading(true);
6664
let authorizeResponse: Credentials;
@@ -80,7 +78,6 @@ export const AuthProvider: React.FC<AuthProviderProps> = ({ children, config })
8078

8179
const email = authorizeUserInfo?.email;
8280
try {
83-
// This hook should not depend on any action, but for the little time I have I leave it like this
8481
await fetchUser(eichBaseEndpoint, eichBaseToken);
8582
} catch (error) {
8683
console.log('eichbase error', JSON.stringify(error));
@@ -103,7 +100,6 @@ export const AuthProvider: React.FC<AuthProviderProps> = ({ children, config })
103100

104101

105102
const logout = React.useCallback(async () => {
106-
console.log('logout');
107103
try {
108104
await auth0.webAuth.clearSession();
109105
} catch (error) {
@@ -114,17 +110,14 @@ export const AuthProvider: React.FC<AuthProviderProps> = ({ children, config })
114110
}, [auth0, removeToken]);
115111

116112

117-
const AuthenticateCheck = async (): Promise<void> => {
118-
console.log('start auth --- getting store token', auth0);
113+
const authenticateCheck = async (): Promise<void> => {
119114
const storedCredentials = await onGetStoreToken();
120115

121116
if (!storedCredentials) {
122117
setLoading(false);
123118
return;
124119
}
125120

126-
console.log('requesting auth token');
127-
128121
let request;
129122
try {
130123
request = await auth0.auth.userInfo({
@@ -142,8 +135,7 @@ export const AuthProvider: React.FC<AuthProviderProps> = ({ children, config })
142135
};
143136

144137
React.useEffect(() => {
145-
console.log('use effect');
146-
AuthenticateCheck();
138+
authenticateCheck();
147139
// eslint-disable-next-line react-hooks/exhaustive-deps
148140
}, []);
149141

0 commit comments

Comments
 (0)