Skip to content

Commit

Permalink
fix(oidc): Add undefined as union type into arguments for login, logo…
Browse files Browse the repository at this point in the history
…ut, renewTokens (#1429) (alpha)

* Add null as union type into arguments for login, logout, renewTokens functions

* Update default value as undefined for ayncronous function
  • Loading branch information
ShimpeiKamiguchi authored Aug 2, 2024
1 parent 5b9fdcf commit 23ae6ba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/react-oidc/src/ReactOidc.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const useOidc = (configurationName = defaultConfigurationName) => {

const login = (
callbackPath: string | undefined = undefined,
extras: StringMap | null = null,
extras: StringMap | undefined = undefined,
silentLoginOnly = false,
) => {
return getOidc(configurationName).loginAsync(
Expand All @@ -59,12 +59,12 @@ export const useOidc = (configurationName = defaultConfigurationName) => {
};
const logout = (
callbackPath: string | null | undefined = undefined,
extras: StringMap | null = null,
extras: StringMap | undefined = undefined,
) => {
return getOidc(configurationName).logoutAsync(callbackPath, extras);
};
const renewTokens = async (
extras: StringMap | null = null,
extras: StringMap | undefined = undefined,
): Promise<OidcAccessToken | OidcIdToken> => {
const tokens = await getOidc(configurationName).renewTokensAsync(extras);

Expand Down

0 comments on commit 23ae6ba

Please sign in to comment.