@@ -50,15 +50,16 @@ class FirebaseUser extends UserInfo {
50
50
/// the given account.
51
51
///
52
52
/// Errors:
53
- /// • `ERROR_WEAK_PASSWORD` - If the password is not strong enough.
54
- /// • `ERROR_INVALID_CREDENTIAL` - If the credential is malformed or has expired.
55
- /// • `ERROR_EMAIL_ALREADY_IN_USE` - If the email is already in use by a different account.
56
- /// • `ERROR_CREDENTIAL_ALREADY_IN_USE` - If the account is already in use by a different account, e.g. with phone auth.
57
- /// • `ERROR_USER_DISABLED` - If the user has been disabled (for example, in the Firebase console)
58
- /// • `ERROR_REQUIRES_RECENT_LOGIN` - If the user's last sign-in time does not meet the security threshold. Use reauthenticate methods to resolve.
59
- /// • `ERROR_PROVIDER_ALREADY_LINKED` - If the current user already has an account of this type linked.
60
- /// • `ERROR_OPERATION_NOT_ALLOWED` - Indicates that this type of account is not enabled.
61
- /// • `ERROR_INVALID_ACTION_CODE` - If the action code in the link is malformed, expired, or has already been used.
53
+ ///
54
+ /// * `ERROR_WEAK_PASSWORD` - If the password is not strong enough.
55
+ /// * `ERROR_INVALID_CREDENTIAL` - If the credential is malformed or has expired.
56
+ /// * `ERROR_EMAIL_ALREADY_IN_USE` - If the email is already in use by a different account.
57
+ /// * `ERROR_CREDENTIAL_ALREADY_IN_USE` - If the account is already in use by a different account, e.g. with phone auth.
58
+ /// * `ERROR_USER_DISABLED` - If the user has been disabled (for example, in the Firebase console)
59
+ /// * `ERROR_REQUIRES_RECENT_LOGIN` - If the user's last sign-in time does not meet the security threshold. Use reauthenticate methods to resolve.
60
+ /// * `ERROR_PROVIDER_ALREADY_LINKED` - If the current user already has an account of this type linked.
61
+ /// * `ERROR_OPERATION_NOT_ALLOWED` - Indicates that this type of account is not enabled.
62
+ /// * `ERROR_INVALID_ACTION_CODE` - If the action code in the link is malformed, expired, or has already been used.
62
63
/// This can only occur when using [EmailAuthProvider.getCredentialWithLink] to obtain the credential.
63
64
Future <AuthResult > linkWithCredential (AuthCredential credential) async {
64
65
assert (credential != null );
@@ -91,10 +92,11 @@ class FirebaseUser extends UserInfo {
91
92
/// Deletes the current user (also signs out the user).
92
93
///
93
94
/// Errors:
94
- /// • `ERROR_REQUIRES_RECENT_LOGIN` - If the user's last sign-in time does not meet the security threshold. Use reauthenticate methods to resolve.
95
- /// • `ERROR_INVALID_CREDENTIAL` - If the credential is malformed or has expired.
96
- /// • `ERROR_USER_DISABLED` - If the user has been disabled (for example, in the Firebase console)
97
- /// • `ERROR_USER_NOT_FOUND` - If the user has been deleted (for example, in the Firebase console)
95
+ ///
96
+ /// * `ERROR_REQUIRES_RECENT_LOGIN` - If the user's last sign-in time does not meet the security threshold. Use reauthenticate methods to resolve.
97
+ /// * `ERROR_INVALID_CREDENTIAL` - If the credential is malformed or has expired.
98
+ /// * `ERROR_USER_DISABLED` - If the user has been disabled (for example, in the Firebase console)
99
+ /// * `ERROR_USER_NOT_FOUND` - If the user has been deleted (for example, in the Firebase console)
98
100
Future <void > delete () async {
99
101
await FirebaseAuth .channel
100
102
.invokeMethod <void >('delete' , < String , String > {'app' : _app.name});
@@ -110,12 +112,13 @@ class FirebaseUser extends UserInfo {
110
112
/// the user to have recently signed in.
111
113
///
112
114
/// Errors:
113
- /// • `ERROR_INVALID_CREDENTIAL` - If the email address is malformed.
114
- /// • `ERROR_EMAIL_ALREADY_IN_USE` - If the email is already in use by a different account.
115
- /// • `ERROR_USER_DISABLED` - If the user has been disabled (for example, in the Firebase console)
116
- /// • `ERROR_USER_NOT_FOUND` - If the user has been deleted (for example, in the Firebase console)
117
- /// • `ERROR_REQUIRES_RECENT_LOGIN` - If the user's last sign-in time does not meet the security threshold. Use reauthenticate methods to resolve.
118
- /// • `ERROR_OPERATION_NOT_ALLOWED` - Indicates that Email & Password accounts are not enabled.
115
+ ///
116
+ /// * `ERROR_INVALID_CREDENTIAL` - If the email address is malformed.
117
+ /// * `ERROR_EMAIL_ALREADY_IN_USE` - If the email is already in use by a different account.
118
+ /// * `ERROR_USER_DISABLED` - If the user has been disabled (for example, in the Firebase console)
119
+ /// * `ERROR_USER_NOT_FOUND` - If the user has been deleted (for example, in the Firebase console)
120
+ /// * `ERROR_REQUIRES_RECENT_LOGIN` - If the user's last sign-in time does not meet the security threshold. Use reauthenticate methods to resolve.
121
+ /// * `ERROR_OPERATION_NOT_ALLOWED` - Indicates that Email & Password accounts are not enabled.
119
122
Future <void > updateEmail (String email) async {
120
123
assert (email != null );
121
124
return await FirebaseAuth .channel.invokeMethod <void >(
@@ -154,11 +157,12 @@ class FirebaseUser extends UserInfo {
154
157
/// the user to have recently signed in.
155
158
///
156
159
/// Errors:
157
- /// • `ERROR_WEAK_PASSWORD` - If the password is not strong enough.
158
- /// • `ERROR_USER_DISABLED` - If the user has been disabled (for example, in the Firebase console)
159
- /// • `ERROR_USER_NOT_FOUND` - If the user has been deleted (for example, in the Firebase console)
160
- /// • `ERROR_REQUIRES_RECENT_LOGIN` - If the user's last sign-in time does not meet the security threshold. Use reauthenticate methods to resolve.
161
- /// • `ERROR_OPERATION_NOT_ALLOWED` - Indicates that Email & Password accounts are not enabled.
160
+ ///
161
+ /// * `ERROR_WEAK_PASSWORD` - If the password is not strong enough.
162
+ /// * `ERROR_USER_DISABLED` - If the user has been disabled (for example, in the Firebase console)
163
+ /// * `ERROR_USER_NOT_FOUND` - If the user has been deleted (for example, in the Firebase console)
164
+ /// * `ERROR_REQUIRES_RECENT_LOGIN` - If the user's last sign-in time does not meet the security threshold. Use reauthenticate methods to resolve.
165
+ /// * `ERROR_OPERATION_NOT_ALLOWED` - Indicates that Email & Password accounts are not enabled.
162
166
Future <void > updatePassword (String password) async {
163
167
assert (password != null );
164
168
return await FirebaseAuth .channel.invokeMethod <void >(
@@ -170,8 +174,9 @@ class FirebaseUser extends UserInfo {
170
174
/// Updates the user profile information.
171
175
///
172
176
/// Errors:
173
- /// • `ERROR_USER_DISABLED` - If the user has been disabled (for example, in the Firebase console)
174
- /// • `ERROR_USER_NOT_FOUND` - If the user has been deleted (for example, in the Firebase console)
177
+ ///
178
+ /// * `ERROR_USER_DISABLED` - If the user has been disabled (for example, in the Firebase console)
179
+ /// * `ERROR_USER_NOT_FOUND` - If the user has been deleted (for example, in the Firebase console)
175
180
Future <void > updateProfile (UserUpdateInfo userUpdateInfo) async {
176
181
assert (userUpdateInfo != null );
177
182
final Map <String , String > data = userUpdateInfo._updateData;
@@ -194,10 +199,11 @@ class FirebaseUser extends UserInfo {
194
199
/// error is returned and the current user remains signed in.
195
200
///
196
201
/// Errors:
197
- /// • `ERROR_INVALID_CREDENTIAL` - If the [authToken] or [authTokenSecret] is malformed or has expired.
198
- /// • `ERROR_USER_DISABLED` - If the user has been disabled (for example, in the Firebase console)
199
- /// • `ERROR_USER_NOT_FOUND` - If the user has been deleted (for example, in the Firebase console)
200
- /// • `ERROR_OPERATION_NOT_ALLOWED` - Indicates that Email & Password accounts are not enabled.
202
+ ///
203
+ /// * `ERROR_INVALID_CREDENTIAL` - If the [authToken] or [authTokenSecret] is malformed or has expired.
204
+ /// * `ERROR_USER_DISABLED` - If the user has been disabled (for example, in the Firebase console)
205
+ /// * `ERROR_USER_NOT_FOUND` - If the user has been deleted (for example, in the Firebase console)
206
+ /// * `ERROR_OPERATION_NOT_ALLOWED` - Indicates that Email & Password accounts are not enabled.
201
207
Future <AuthResult > reauthenticateWithCredential (
202
208
AuthCredential credential) async {
203
209
assert (credential != null );
@@ -224,8 +230,9 @@ class FirebaseUser extends UserInfo {
224
230
/// Use the `providerId` method of an auth provider for [provider] .
225
231
///
226
232
/// Errors:
227
- /// • `ERROR_NO_SUCH_PROVIDER` - If the user does not have a Github Account linked to their account.
228
- /// • `ERROR_REQUIRES_RECENT_LOGIN` - If the user's last sign-in time does not meet the security threshold. Use reauthenticate methods to resolve.
233
+ ///
234
+ /// * `ERROR_NO_SUCH_PROVIDER` - If the user does not have a Github Account linked to their account.
235
+ /// * `ERROR_REQUIRES_RECENT_LOGIN` - If the user's last sign-in time does not meet the security threshold. Use reauthenticate methods to resolve.
229
236
Future <void > unlinkFromProvider (String provider) async {
230
237
assert (provider != null );
231
238
return await FirebaseAuth .channel.invokeMethod <void >(
0 commit comments