File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "name" : " @cobuildlab/react-native-auth0" ,
3- "version" : " 0.3.1 " ,
3+ "version" : " 0.3.2 " ,
44 "description" : " Todo" ,
55 "main" : " lib/index.js" ,
66 "types" : " ./lib/index.d.ts" ,
Original file line number Diff line number Diff line change @@ -25,10 +25,9 @@ export const AuthProvider: React.FC<{
2525 } ) ;
2626 } , [ client ] ) ;
2727
28- const authorize : AuthClientContextType [ 'authorize' ] = async ( {
29- scope : newScope ,
30- options,
31- } ) => {
28+ const authorize : AuthClientContextType [ 'authorize' ] = async ( params ) => {
29+ const { scope : newScope , options } = params || { } ;
30+
3231 setState ( ( prev ) => ( { ...prev , isLoading : true } ) ) ;
3332 client
3433 . authorize ( newScope || scope , options )
Original file line number Diff line number Diff line change @@ -33,10 +33,14 @@ export type CredentialsHandlersInput = CredentialsHandlersInputBase &
3333 ) ;
3434
3535export interface AuthClientContextType {
36- authorize : ( args : {
37- scope ?: string ;
38- options ?: AuthorizeOptions ;
39- } ) => Promise < void > ;
36+ authorize : (
37+ args :
38+ | {
39+ scope ?: string ;
40+ options ?: AuthorizeOptions ;
41+ }
42+ | undefined ,
43+ ) => Promise < void > ;
4044 isAuthenticated : boolean ;
4145 isLoading : boolean ;
4246 clearSession : ( ) => Promise < void > ;
You can’t perform that action at this time.
0 commit comments