UNPKG

11 kBTypeScriptView Raw
1/*! firebase-admin v13.0.1 */
2/*!
3 * Copyright 2021 Google Inc.
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 */
17import { App } from '../app/index';
18import { ActionCodeSettings as TActionCodeSettings } from './action-code-settings-builder';
19import { Auth as TAuth } from './auth';
20import { AuthFactorType as TAuthFactorType, AuthProviderConfig as TAuthProviderConfig, AuthProviderConfigFilter as TAuthProviderConfigFilter, CreateRequest as TCreateRequest, CreateMultiFactorInfoRequest as TCreateMultiFactorInfoRequest, CreatePhoneMultiFactorInfoRequest as TCreatePhoneMultiFactorInfoRequest, EmailSignInProviderConfig as TEmailSignInProviderConfig, ListProviderConfigResults as TListProviderConfigResults, MultiFactorCreateSettings as TMultiFactorCreateSettings, MultiFactorConfig as TMultiFactorConfig, MultiFactorConfigState as TMultiFactorConfigState, MultiFactorUpdateSettings as TMultiFactorUpdateSettings, OIDCAuthProviderConfig as TOIDCAuthProviderConfig, OIDCUpdateAuthProviderRequest as TOIDCUpdateAuthProviderRequest, SAMLAuthProviderConfig as TSAMLAuthProviderConfig, SAMLUpdateAuthProviderRequest as TSAMLUpdateAuthProviderRequest, UpdateAuthProviderRequest as TUpdateAuthProviderRequest, UpdateMultiFactorInfoRequest as TUpdateMultiFactorInfoRequest, UpdatePhoneMultiFactorInfoRequest as TUpdatePhoneMultiFactorInfoRequest, UpdateRequest as TUpdateRequest } from './auth-config';
21import { BaseAuth as TBaseAuth, DeleteUsersResult as TDeleteUsersResult, GetUsersResult as TGetUsersResult, ListUsersResult as TListUsersResult, SessionCookieOptions as TSessionCookieOptions } from './base-auth';
22import { EmailIdentifier as TEmailIdentifier, PhoneIdentifier as TPhoneIdentifier, ProviderIdentifier as TProviderIdentifier, UserIdentifier as TUserIdentifier, UidIdentifier as TUidIdentifier } from './identifier';
23import { CreateTenantRequest as TCreateTenantRequest, Tenant as TTenant, UpdateTenantRequest as TUpdateTenantRequest } from './tenant';
24import { ListTenantsResult as TListTenantsResult, TenantAwareAuth as TTenantAwareAuth, TenantManager as TTenantManager } from './tenant-manager';
25import { DecodedIdToken as TDecodedIdToken, DecodedAuthBlockingToken as TDecodedAuthBlockingToken } from './token-verifier';
26import { HashAlgorithmType as THashAlgorithmType, UserImportOptions as TUserImportOptions, UserImportRecord as TUserImportRecord, UserImportResult as TUserImportResult, UserMetadataRequest as TUserMetadataRequest, UserProviderRequest as TUserProviderRequest } from './user-import-builder';
27import { MultiFactorInfo as TMultiFactorInfo, MultiFactorSettings as TMultiFactorSettings, PhoneMultiFactorInfo as TPhoneMultiFactorInfo, UserInfo as TUserInfo, UserMetadata as TUserMetadata, UserRecord as TUserRecord } from './user-record';
28/**
29 * Gets the {@link firebase-admin.auth#Auth} service for the default app or a
30 * given app.
31 *
32 * `admin.auth()` can be called with no arguments to access the default app's
33 * {@link firebase-admin.auth#Auth} service or as `admin.auth(app)` to access the
34 * {@link firebase-admin.auth#Auth} service associated with a specific app.
35 *
36 * @example
37 * ```javascript
38 * // Get the Auth service for the default app
39 * var defaultAuth = admin.auth();
40 * ```
41 *
42 * @example
43 * ```javascript
44 * // Get the Auth service for a given app
45 * var otherAuth = admin.auth(otherApp);
46 * ```
47 *
48 */
49export declare function auth(app?: App): auth.Auth;
50export declare namespace auth {
51 /**
52 * Type alias to {@link firebase-admin.auth#ActionCodeSettings}.
53 */
54 type ActionCodeSettings = TActionCodeSettings;
55 /**
56 * Type alias to {@link firebase-admin.auth#Auth}.
57 */
58 type Auth = TAuth;
59 /**
60 * Type alias to {@link firebase-admin.auth#AuthFactorType}.
61 */
62 type AuthFactorType = TAuthFactorType;
63 /**
64 * Type alias to {@link firebase-admin.auth#AuthProviderConfig}.
65 */
66 type AuthProviderConfig = TAuthProviderConfig;
67 /**
68 * Type alias to {@link firebase-admin.auth#AuthProviderConfigFilter}.
69 */
70 type AuthProviderConfigFilter = TAuthProviderConfigFilter;
71 /**
72 * Type alias to {@link firebase-admin.auth#BaseAuth}.
73 */
74 type BaseAuth = TBaseAuth;
75 /**
76 * Type alias to {@link firebase-admin.auth#CreateMultiFactorInfoRequest}.
77 */
78 type CreateMultiFactorInfoRequest = TCreateMultiFactorInfoRequest;
79 /**
80 * Type alias to {@link firebase-admin.auth#CreatePhoneMultiFactorInfoRequest}.
81 */
82 type CreatePhoneMultiFactorInfoRequest = TCreatePhoneMultiFactorInfoRequest;
83 /**
84 * Type alias to {@link firebase-admin.auth#CreateRequest}.
85 */
86 type CreateRequest = TCreateRequest;
87 /**
88 * Type alias to {@link firebase-admin.auth#CreateTenantRequest}.
89 */
90 type CreateTenantRequest = TCreateTenantRequest;
91 /**
92 * Type alias to {@link firebase-admin.auth#DecodedIdToken}.
93 */
94 type DecodedIdToken = TDecodedIdToken;
95 /** @alpha */
96 type DecodedAuthBlockingToken = TDecodedAuthBlockingToken;
97 /**
98 * Type alias to {@link firebase-admin.auth#DeleteUsersResult}.
99 */
100 type DeleteUsersResult = TDeleteUsersResult;
101 /**
102 * Type alias to {@link firebase-admin.auth#EmailIdentifier}.
103 */
104 type EmailIdentifier = TEmailIdentifier;
105 /**
106 * Type alias to {@link firebase-admin.auth#EmailSignInProviderConfig}.
107 */
108 type EmailSignInProviderConfig = TEmailSignInProviderConfig;
109 /**
110 * Type alias to {@link firebase-admin.auth#GetUsersResult}.
111 */
112 type GetUsersResult = TGetUsersResult;
113 /**
114 * Type alias to {@link firebase-admin.auth#HashAlgorithmType}.
115 */
116 type HashAlgorithmType = THashAlgorithmType;
117 /**
118 * Type alias to {@link firebase-admin.auth#ListProviderConfigResults}.
119 */
120 type ListProviderConfigResults = TListProviderConfigResults;
121 /**
122 * Type alias to {@link firebase-admin.auth#ListTenantsResult}.
123 */
124 type ListTenantsResult = TListTenantsResult;
125 /**
126 * Type alias to {@link firebase-admin.auth#ListUsersResult}.
127 */
128 type ListUsersResult = TListUsersResult;
129 /**
130 * Type alias to {@link firebase-admin.auth#MultiFactorCreateSettings}.
131 */
132 type MultiFactorCreateSettings = TMultiFactorCreateSettings;
133 /**
134 * Type alias to {@link firebase-admin.auth#MultiFactorConfig}.
135 */
136 type MultiFactorConfig = TMultiFactorConfig;
137 /**
138 * Type alias to {@link firebase-admin.auth#MultiFactorConfigState}.
139 */
140 type MultiFactorConfigState = TMultiFactorConfigState;
141 /**
142 * Type alias to {@link firebase-admin.auth#MultiFactorInfo}.
143 */
144 type MultiFactorInfo = TMultiFactorInfo;
145 /**
146 * Type alias to {@link firebase-admin.auth#MultiFactorUpdateSettings}.
147 */
148 type MultiFactorUpdateSettings = TMultiFactorUpdateSettings;
149 /**
150 * Type alias to {@link firebase-admin.auth#MultiFactorSettings}.
151 */
152 type MultiFactorSettings = TMultiFactorSettings;
153 /**
154 * Type alias to {@link firebase-admin.auth#OIDCAuthProviderConfig}.
155 */
156 type OIDCAuthProviderConfig = TOIDCAuthProviderConfig;
157 /**
158 * Type alias to {@link firebase-admin.auth#OIDCUpdateAuthProviderRequest}.
159 */
160 type OIDCUpdateAuthProviderRequest = TOIDCUpdateAuthProviderRequest;
161 /**
162 * Type alias to {@link firebase-admin.auth#PhoneIdentifier}.
163 */
164 type PhoneIdentifier = TPhoneIdentifier;
165 /**
166 * Type alias to {@link firebase-admin.auth#PhoneMultiFactorInfo}.
167 */
168 type PhoneMultiFactorInfo = TPhoneMultiFactorInfo;
169 /**
170 * Type alias to {@link firebase-admin.auth#ProviderIdentifier}.
171 */
172 type ProviderIdentifier = TProviderIdentifier;
173 /**
174 * Type alias to {@link firebase-admin.auth#SAMLAuthProviderConfig}.
175 */
176 type SAMLAuthProviderConfig = TSAMLAuthProviderConfig;
177 /**
178 * Type alias to {@link firebase-admin.auth#SAMLUpdateAuthProviderRequest}.
179 */
180 type SAMLUpdateAuthProviderRequest = TSAMLUpdateAuthProviderRequest;
181 /**
182 * Type alias to {@link firebase-admin.auth#SessionCookieOptions}.
183 */
184 type SessionCookieOptions = TSessionCookieOptions;
185 /**
186 * Type alias to {@link firebase-admin.auth#Tenant}.
187 */
188 type Tenant = TTenant;
189 /**
190 * Type alias to {@link firebase-admin.auth#TenantAwareAuth}.
191 */
192 type TenantAwareAuth = TTenantAwareAuth;
193 /**
194 * Type alias to {@link firebase-admin.auth#TenantManager}.
195 */
196 type TenantManager = TTenantManager;
197 /**
198 * Type alias to {@link firebase-admin.auth#UidIdentifier}.
199 */
200 type UidIdentifier = TUidIdentifier;
201 /**
202 * Type alias to {@link firebase-admin.auth#UpdateAuthProviderRequest}.
203 */
204 type UpdateAuthProviderRequest = TUpdateAuthProviderRequest;
205 /**
206 * Type alias to {@link firebase-admin.auth#UpdateMultiFactorInfoRequest}.
207 */
208 type UpdateMultiFactorInfoRequest = TUpdateMultiFactorInfoRequest;
209 /**
210 * Type alias to {@link firebase-admin.auth#UpdatePhoneMultiFactorInfoRequest}.
211 */
212 type UpdatePhoneMultiFactorInfoRequest = TUpdatePhoneMultiFactorInfoRequest;
213 /**
214 * Type alias to {@link firebase-admin.auth#UpdateRequest}.
215 */
216 type UpdateRequest = TUpdateRequest;
217 /**
218 * Type alias to {@link firebase-admin.auth#UpdateTenantRequest}.
219 */
220 type UpdateTenantRequest = TUpdateTenantRequest;
221 /**
222 * Type alias to {@link firebase-admin.auth#UserIdentifier}.
223 */
224 type UserIdentifier = TUserIdentifier;
225 /**
226 * Type alias to {@link firebase-admin.auth#UserImportOptions}.
227 */
228 type UserImportOptions = TUserImportOptions;
229 /**
230 * Type alias to {@link firebase-admin.auth#UserImportRecord}.
231 */
232 type UserImportRecord = TUserImportRecord;
233 /**
234 * Type alias to {@link firebase-admin.auth#UserImportResult}.
235 */
236 type UserImportResult = TUserImportResult;
237 /**
238 * Type alias to {@link firebase-admin.auth#UserInfo}.
239 */
240 type UserInfo = TUserInfo;
241 /**
242 * Type alias to {@link firebase-admin.auth#UserMetadata}.
243 */
244 type UserMetadata = TUserMetadata;
245 /**
246 * Type alias to {@link firebase-admin.auth#UserMetadataRequest}.
247 */
248 type UserMetadataRequest = TUserMetadataRequest;
249 /**
250 * Type alias to {@link firebase-admin.auth#UserProviderRequest}.
251 */
252 type UserProviderRequest = TUserProviderRequest;
253 /**
254 * Type alias to {@link firebase-admin.auth#UserRecord}.
255 */
256 type UserRecord = TUserRecord;
257}