Repository navigation
feat(firebase): add shared email lookup and account status metadata - #52
Merged
Merged
Conversation
Comment on lines
+36
to
+40
| /** Find a registered fake account by its primary email. */ | ||
| async getUserByEmail(email: string): Promise<{ uid: string; email?: string } | null> { | ||
| const normalized = email.trim().toLowerCase(); | ||
| const record = [...this.tokens.values()].find((user) => user.email?.toLowerCase() === normalized); | ||
| return record ? { uid: record.uid, email: record.email } : null; |
Contributor
|
|
||
| // firebase | ||
| export type { DecodedIdToken, FirebaseVerifier } from './firebase/firebase-verifier.js'; | ||
| export type { DecodedIdToken, FirebaseVerifier, FirebaseUserRecord } from './firebase/firebase-verifier.js'; |
Contributor
There was a problem hiding this comment.
🔍 公開 API 一覧にメール検索が載っていない
API 一覧には getUserByEmail と FirebaseUserRecord がありません。公開 API を一覧から探す利用者のため、更新対象か確認してください。
Was this helpful? React with 👍 or 👎 to provide feedback.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Changes
Add
FirebaseVerifier.getUserByEmail()andFirebaseUserRecordso consuming applications can look up Firebase accounts by email without implementing their own client. UID and email lookups share the Identity Toolkit transport and OAuth token cache, and returndisabledmetadata. Account eligibility remains an application policy.UID lookups now throw on provider failures instead of treating them as missing users. Email lookups treat only
INVALID_EMAILas no match. The API documentation describes this behavior change.Validation
Release considerations
Existing custom
FirebaseVerifierimplementations must addgetUserByEmail().After publishing a new package version, AirLec must update its dependency and lockfile and repeat validation from
npm ci. This PR does not publish the package.