File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
packages/react/src/contexts/Asgardeo Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -97,6 +97,14 @@ export type AsgardeoContextProps = {
97
97
* @returns A promise that resolves to the decoded ID token payload.
98
98
*/
99
99
getDecodedIdToken ?: ( ) => Promise < IdToken > ;
100
+
101
+ /**
102
+ * Function to retrieve the access token.
103
+ * This function retrieves the access token and returns it.
104
+ * @remarks This does not work in the `webWorker` or any other worker environment.
105
+ * @returns A promise that resolves to the access token.
106
+ */
107
+ getAccessToken ?: ( ) => Promise < string > ;
100
108
} ;
101
109
102
110
/**
@@ -124,6 +132,7 @@ const AsgardeoContext: Context<AsgardeoContextProps | null> = createContext<null
124
132
} ,
125
133
signInOptions : { } ,
126
134
getDecodedIdToken : null ,
135
+ getAccessToken : null ,
127
136
} ) ;
128
137
129
138
AsgardeoContext . displayName = 'AsgardeoContext' ;
You can’t perform that action at this time.
0 commit comments