Push notification provider for @startupjs/2fa-manager package
npm install @startupjs/2fa-push-notification-providerProvider for verification via @startupjs/push-notification.
``js`
@startupjs/2fa-manager >= 0.35.10,
@startupjs/push-notification >= 0.35.10
`js`
yarn add @startupjs/2fa-push-notification-provider
IMPORTANT: To use this package, you need to include the @startupjs/push-notification package as specified in the documentation.
You need to import the PushProvider component from @startupjs/2fa-push-notification-provider.
`js`
import { PushProvider } from '@startupjs/2fa-push-notification-provider'
Then you need to add PushProvider to the providers array of initTwoFAManager. The second argument of the array is the options for the provider. Here you can set the optional codeMaxAge parameter, this time during which the code is considered valid. By default, codeMaxAge = 30000
`js``
initTwoFAManager(ee, {
providers: [
[PushProvider, { codeMaxAge: 'YOUR_TIME_IN_MS' }]
]
})