Skip to content

Commit c8de86d

Browse files
feat(pnv): Add support for Phone Number Verification (#3101)
* feat(auth): Add support for FPNV (#3030) * feat: add basic fpnv * chore: resolve comments * fix: remove unused interface * chore: update export * chore: linting * chore: update export * feat: add apidocs * chore: resolve commnets * chore: linting * chore: add unit test * chore: change test description * chore: remove extra line * chore: add unit test * chore: add unit test * chore: fix minor comments * chore: add unit test * chore: add unot test * chore: update api.md * chore: update sdk * feat: update fpnv * chore: update jwt spec * chore: resolve comments * chore: test cover Fpnv index * chore: update test coverage * feat: add namespace support * fix(fpnv): validate JWT audience using project ID and improve safety checks * rename FPNV to PhoneNumberVerification and replace getPhoneNumber() with property * remove namspaces and ensure naming consistency * fix api extractor * fix tests * address PR feedback * PR comments PR comments --------- Co-authored-by: boikoa-gl <boikoa@google.com>
1 parent a3faacf commit c8de86d

16 files changed

+3068
-1393
lines changed

entrypoints.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
"typings": "./lib/auth/index.d.ts",
1717
"dist": "./lib/auth/index.js"
1818
},
19+
"firebase-admin/phone-number-verification": {
20+
"typings": "./lib/phone-number-verification/index.d.ts",
21+
"dist": "./lib/phone-number-verification/index.js"
22+
},
1923
"firebase-admin/database": {
2024
"typings": "./lib/database/index.d.ts",
2125
"dist": "./lib/database/index.js"
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
## API Report File for "firebase-admin.phone-number-verification"
2+
3+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4+
5+
```ts
6+
7+
import { Agent } from 'http';
8+
9+
// Warning: (ae-forgotten-export) The symbol "App" needs to be exported by the entry point index.d.ts
10+
//
11+
// @public
12+
export function getPhoneNumberVerification(app?: App): PhoneNumberVerification;
13+
14+
// @public
15+
export class PhoneNumberVerification {
16+
get app(): App;
17+
verifyToken(jwt: string): Promise<PhoneNumberVerificationToken>;
18+
}
19+
20+
// @public
21+
export interface PhoneNumberVerificationToken {
22+
[key: string]: any;
23+
aud: string[];
24+
exp: number;
25+
iat: number;
26+
iss: string;
27+
jti: string;
28+
nonce: string;
29+
phoneNumber: string;
30+
sub: string;
31+
}
32+
33+
```

0 commit comments

Comments
 (0)