mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-04 19:42:46 +08:00
Added missing optional refreshToken in PasswordRealmResponse, closes #25823.
This commit is contained in:
1
types/react-native-auth0/index.d.ts
vendored
1
types/react-native-auth0/index.d.ts
vendored
@@ -54,6 +54,7 @@ export interface PasswordRealmResponse {
|
||||
idToken: string;
|
||||
scope: string;
|
||||
tokenType: "Bearer";
|
||||
refreshToken?: string;
|
||||
}
|
||||
|
||||
export interface RefreshTokenParams {
|
||||
|
||||
@@ -30,12 +30,19 @@ auth0.auth.logoutUrl({
|
||||
returnTo: "http://localhost:3000"
|
||||
});
|
||||
|
||||
auth0.auth.passwordRealm({
|
||||
username: "me@example.com",
|
||||
password: "password",
|
||||
realm: "realm",
|
||||
audience: "user-info"
|
||||
});
|
||||
auth0.auth
|
||||
.passwordRealm({
|
||||
username: "me@example.com",
|
||||
password: "password",
|
||||
realm: "realm",
|
||||
audience: "user-info"
|
||||
})
|
||||
.then(res => {
|
||||
if (res.refreshToken) {
|
||||
return res.refreshToken;
|
||||
}
|
||||
return res.accessToken;
|
||||
});
|
||||
|
||||
auth0.auth.refreshToken({
|
||||
refreshToken: "refresh-token",
|
||||
|
||||
Reference in New Issue
Block a user