Skip to content

Commit 10dac20

Browse files
committed
update version
1 parent 366ed45 commit 10dac20

4 files changed

Lines changed: 3 additions & 7 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cobuildlab/react-native-auth0",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"description": "Todo",
55
"main": "lib/index.js",
66
"types": "./lib/index.d.ts",

src/provider.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { AuthProviderProps } from './types';
88

99

1010
export const AuthProvider: React.FC<AuthProviderProps> = ({ children, config }) => {
11-
const { auth0, eichBaseEndpoint, eichBaseToken, eichBaseAuthProfileId, saveCredentials, getCredentials, removeCredentials } = config;
11+
const { auth0, eichBaseEndpoint, eichBaseAuthProfileId, saveCredentials, getCredentials, removeCredentials } = config;
1212
const [credentials, setCredentials] = React.useState<Credentials>();
1313
const [userInfo, setUserInfo] = React.useState<UserInfo>();
1414
const [isAuthenticated, setAuthenticated] = React.useState(false);
@@ -103,6 +103,7 @@ export const AuthProvider: React.FC<AuthProviderProps> = ({ children, config })
103103

104104

105105
const logout = React.useCallback(async () => {
106+
setLoading(true);
106107
try {
107108
await auth0.webAuth.clearSession();
108109
} catch (error) {

src/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ export type UseAuthType = {
1717
export type AuthProviderConfig = {
1818
auth0: Auth0;
1919
eichBaseEndpoint: string;
20-
eichBaseToken: string;
2120
eichBaseAuthProfileId: string;
2221
getCredentials: () => Promise< Credentials | null>;
2322
removeCredentials: () => Promise<void>;

src/utils.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ export const fetchUser = async (endpoint: string, token: string): Promise<User |
1313
});
1414

1515
const response = await request.json();
16-
console.log('response get user', JSON.stringify(response));
1716

1817
if(response?.errors){
1918
throw new Error(JSON.stringify(response?.errors));
@@ -32,8 +31,6 @@ type createUserParams = {
3231
export const createUser = async (params: createUserParams): Promise<User> => {
3332
const { endpoint, token, email, authProfileId } = params;
3433

35-
console.log('params', params);
36-
3734
const request = await fetch(endpoint, {
3835
method: "POST",
3936
headers: {
@@ -46,7 +43,6 @@ export const createUser = async (params: createUserParams): Promise<User> => {
4643
});
4744

4845
const response = await request.json();
49-
console.log('response mutation create user', JSON.stringify(response));
5046

5147
if(response?.errors){
5248
throw new Error(JSON.stringify(response?.errors));

0 commit comments

Comments
 (0)