Skip to content

Commit acd2649

Browse files
committed
chore(react): make signInOptions and token-related methods required in AsgardeoContextProps
1 parent 3db1cd6 commit acd2649

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/react/src/contexts/Asgardeo/AsgardeoContext.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,30 +97,30 @@ export type AsgardeoContextProps = {
9797
* @example
9898
* signInOptions: { prompt: "login", fidp: "OrganizationSSO" }
9999
*/
100-
signInOptions?: SignInOptions;
100+
signInOptions: SignInOptions;
101101
/**
102102
* Function to retrieve the decoded ID token.
103103
* This function decodes the ID token and returns its payload.
104104
* It can be used to access user claims and other information contained in the ID token.
105105
*
106106
* @returns A promise that resolves to the decoded ID token payload.
107107
*/
108-
getDecodedIdToken?: () => Promise<IdToken>;
108+
getDecodedIdToken: () => Promise<IdToken>;
109109

110110
/**
111111
* Retrieves the access token stored in the storage.
112112
* This function retrieves the access token and returns it.
113113
* @remarks This does not work in the `webWorker` or any other worker environment.
114114
* @returns A promise that resolves to the access token.
115115
*/
116-
getAccessToken?: () => Promise<string>;
116+
getAccessToken: () => Promise<string>;
117117

118118
/**
119119
* Swaps the current access token with a new one based on the provided configuration (with a grant type).
120120
* @param config - Configuration for the token exchange request.
121121
* @returns A promise that resolves to the token response or the raw response.
122122
*/
123-
exchangeToken?: (config: TokenExchangeRequestConfig) => Promise<TokenResponse | Response>;
123+
exchangeToken: (config: TokenExchangeRequestConfig) => Promise<TokenResponse | Response>;
124124
} & Pick<AsgardeoReactConfig, 'storage'>;
125125

126126
/**

0 commit comments

Comments
 (0)