No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

id_token.d.ts 2.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /**
  2. * @license
  3. * Copyright 2020 Google LLC
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License");
  6. * you may not use this file except in compliance with the License.
  7. * You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. */
  17. import { PhoneOrOauthTokenResponse } from '../api/authentication/mfa';
  18. /**
  19. * Raw encoded JWT
  20. *
  21. */
  22. export declare type IdToken = string;
  23. /**
  24. * Raw parsed JWT
  25. *
  26. */
  27. export interface ParsedIdToken {
  28. iss: string;
  29. aud: string;
  30. exp: number;
  31. sub: string;
  32. iat: number;
  33. email?: string;
  34. verified: boolean;
  35. providerId?: string;
  36. tenantId?: string;
  37. anonymous: boolean;
  38. federatedId?: string;
  39. displayName?: string;
  40. photoURL?: string;
  41. toString(): string;
  42. }
  43. /**
  44. * IdToken as returned by the API
  45. *
  46. * @internal
  47. */
  48. export interface IdTokenResponse {
  49. localId: string;
  50. idToken?: IdToken;
  51. refreshToken?: string;
  52. expiresIn?: string;
  53. providerId?: string;
  54. displayName?: string | null;
  55. isNewUser?: boolean;
  56. kind?: IdTokenResponseKind;
  57. photoUrl?: string | null;
  58. rawUserInfo?: string;
  59. screenName?: string | null;
  60. }
  61. /**
  62. * The possible types of the `IdTokenResponse`
  63. *
  64. * @internal
  65. */
  66. export declare const enum IdTokenResponseKind {
  67. CreateAuthUri = "identitytoolkit#CreateAuthUriResponse",
  68. DeleteAccount = "identitytoolkit#DeleteAccountResponse",
  69. DownloadAccount = "identitytoolkit#DownloadAccountResponse",
  70. EmailLinkSignin = "identitytoolkit#EmailLinkSigninResponse",
  71. GetAccountInfo = "identitytoolkit#GetAccountInfoResponse",
  72. GetOobConfirmationCode = "identitytoolkit#GetOobConfirmationCodeResponse",
  73. GetRecaptchaParam = "identitytoolkit#GetRecaptchaParamResponse",
  74. ResetPassword = "identitytoolkit#ResetPasswordResponse",
  75. SetAccountInfo = "identitytoolkit#SetAccountInfoResponse",
  76. SignupNewUser = "identitytoolkit#SignupNewUserResponse",
  77. UploadAccount = "identitytoolkit#UploadAccountResponse",
  78. VerifyAssertion = "identitytoolkit#VerifyAssertionResponse",
  79. VerifyCustomToken = "identitytoolkit#VerifyCustomTokenResponse",
  80. VerifyPassword = "identitytoolkit#VerifyPasswordResponse"
  81. }
  82. /**
  83. * @internal
  84. */
  85. export interface TaggedWithTokenResponse {
  86. _tokenResponse?: PhoneOrOauthTokenResponse;
  87. }