docs-devsite/auth.phoneauthcredential.md
Project: /docs/reference/js/_project.yaml Book: /docs/reference/_book.yaml page_type: reference
{% comment %} DO NOT EDIT THIS FILE! This is generated by the JS SDK team, and any local changes will be overwritten. Changes should be made in the source code at https://github.com/firebase/firebase-js-sdk {% endcomment %}
Represents the credentials returned by PhoneAuthProvider<!-- -->.
<b>Signature:</b>
export declare class PhoneAuthCredential extends AuthCredential
<b>Extends:</b> AuthCredential
| Method | Modifiers | Description |
|---|---|---|
| fromJSON(json) | <code>static</code> | Generates a phone credential based on a plain object or a JSON string. |
| toJSON() | Returns a JSON-serializable representation of this object. |
Generates a phone credential based on a plain object or a JSON string.
<b>Signature:</b>
static fromJSON(json: object | string): PhoneAuthCredential | null;
| Parameter | Type | Description |
|---|---|---|
| json | object | string |
<b>Returns:</b>
PhoneAuthCredential | null
Returns a JSON-serializable representation of this object.
<b>Signature:</b>
toJSON(): object;
<b>Returns:</b>
object
a JSON-serializable representation of this object.