mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
Merge pull request #25871 from ascariandrea/react-native-auth0
rea t-native-auth0: Added missing optional refreshToken in PasswordRealmResponse
This commit is contained in:
Vendored
+1
@@ -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