-
Notifications
You must be signed in to change notification settings - Fork 2.3k
refactor(auth)!: Migrate to typescript #8936
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
MichaelVerdon
wants to merge
33
commits into
main
Choose a base branch
from
auth-typescript
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
bf74165
fix(firestore): add QueryConstraint interface so constraint arrays ty…
MichaelVerdon 0928332
refactor(auth)!: Migrate to typescript
MichaelVerdon 4257b2c
refactor: auth providers to typescript
MichaelVerdon d43b746
refactor: password policy and modular
MichaelVerdon 231ef34
refactor: code review fixes
MichaelVerdon 60e59db
Merge branch 'main' into auth-typescript
MichaelVerdon 8cb5c23
revert(firestore): remove query.ts changes from auth migration PR
MichaelVerdon 52d3dd8
format: revert firestore changes
MichaelVerdon 11baeaf
fix: namespaced file
MichaelVerdon eb5ead4
fix: types
MichaelVerdon 90aeadf
fix: jest issues related to ai
MichaelVerdon 8b9460a
fix: es config
MichaelVerdon 2e7da7d
fix: tsconfig
MichaelVerdon a9f154e
fix: temp fix
MichaelVerdon 7d03ba4
fix: binary base changes
MichaelVerdon a633029
fix: point tsconfig at app shim for react-native-binaryToBase64
MichaelVerdon 0ec85d2
refactor: TS for TotpSecret, TotpMultiFactorGenerator, PhoneMultiFact…
MichaelVerdon e045def
fix: types
MichaelVerdon 3dcd59e
fix: namespace types
MichaelVerdon d5513f0
reformat: js lint
MichaelVerdon 288e441
format: fix lint
MichaelVerdon 7b4548f
fix: call handler with explicit receiver
MichaelVerdon afdf5fd
chore(tests): local Detox AVD name and index entry comments
MichaelVerdon 4c5f619
Merge origin/main into auth-typescript
MichaelVerdon cc670da
chore: revert temp commit
MichaelVerdon a2ebcc2
test: avoid instanceof User in phone sign-in e2e
MichaelVerdon 9d6afa7
fix: avoid RangeError when User metadata omits timestamps on Android
MichaelVerdon 46e7a08
chore: suppress console usage
MichaelVerdon 1ef539e
fix: metadata timestamp helper
MichaelVerdon b7674f9
format: js format
MichaelVerdon 908b044
chore: macos build
MichaelVerdon 59d782e
chore: pod install
MichaelVerdon ac98916
chore: revert mac scripts
MichaelVerdon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| // No-op for android. | ||
| const module: Record<string, never> = {}; | ||
| // No-op for android. Avoid binding name `module` (Jest runs TS in a CJS context). | ||
| const noopNativeModule: Record<string, never> = {}; | ||
|
|
||
| export default module; | ||
| export default noopNativeModule; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| // No-op for ios. | ||
| const module: Record<string, never> = {}; | ||
| // No-op for ios. Avoid binding name `module` (Jest runs TS in a CJS context). | ||
| const noopNativeModule: Record<string, never> = {}; | ||
|
|
||
| export default module; | ||
| export default noopNativeModule; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| /* | ||
| * Deep import from `react-native` (not declared in `@types/react-native`). | ||
| * Used by @react-native-firebase/app Base64 helper. | ||
| */ | ||
| declare module 'react-native/Libraries/Utilities/binaryToBase64' { | ||
| export default function binaryToBase64(data: ArrayBuffer | Uint8Array): string; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| /* | ||
| * Copyright (c) 2016-present Invertase Limited & Contributors | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this library except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| * | ||
| */ | ||
|
|
||
| import type { AuthInternal } from './types/internal'; | ||
| import type { MultiFactorInfo } from './types/auth'; | ||
|
|
||
| interface ResolverShape { | ||
| hints: MultiFactorInfo[]; | ||
| session: string; | ||
| } | ||
|
|
||
| export default class MultiFactorResolver { | ||
| _auth: AuthInternal; | ||
| hints: MultiFactorInfo[]; | ||
| session: string; | ||
|
|
||
| constructor(auth: AuthInternal, resolver: ResolverShape) { | ||
| this._auth = auth; | ||
| this.hints = resolver.hints; | ||
| this.session = resolver.session; | ||
| } | ||
|
|
||
| resolveSignIn(assertion: { | ||
| token?: string; | ||
| secret?: string; | ||
| uid?: string; | ||
| verificationCode?: string; | ||
| }): Promise<unknown> { | ||
| const { token, secret, uid, verificationCode } = assertion; | ||
|
|
||
| if (token && secret) { | ||
| return this._auth.resolveMultiFactorSignIn(this.session, token, secret); | ||
| } | ||
|
|
||
| return this._auth.resolveTotpSignIn(this.session, uid ?? '', verificationCode ?? ''); | ||
| } | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.