You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: EXAMPLES-WEB.md
+117-8Lines changed: 117 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -158,14 +158,123 @@ const App = () => {
158
158
};
159
159
```
160
160
161
-
## Unsupported Web Features
161
+
## 3. MFA Flexible Factors Grant (Web)
162
162
163
-
For security reasons, the web platform **does not support** direct authentication grants. The following methods from the `auth` provider will throw a `NotImplemented` error:
163
+
The MFA Flexible Factors Grant is fully supported on the web platform. It uses the `@auth0/auth0-spa-js` MFA API under the hood.
164
164
165
-
-`auth.passwordRealm()`
166
-
-`auth.loginWithOTP()`
167
-
-`auth.loginWithSMS()`
168
-
-`auth.loginWithEmail()`
169
-
-`auth.refreshToken()`
165
+
### Using MFA with Hooks
170
166
171
-
All these flows should be configured in your [Auth0 Universal Login](https://auth0.com/docs/universal-login) page and initiated via the `authorize()` method.
167
+
```tsx
168
+
importReact, { useState } from'react';
169
+
import { View, Button, TextInput, Text } from'react-native';
The web platform supports direct authentication grants including `auth.passwordRealm()`, `auth.createUser()`, `auth.resetPassword()`, and the MFA Flexible Factors Grant. These methods make direct HTTP calls to the Auth0 API.
279
+
280
+
Token refresh is handled automatically by `credentialsManager.getCredentials()` on the web. The `auth.refreshToken()` method is not available.
0 commit comments