Adds authentication
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { AuthProvider } from '@redwoodjs/auth'
|
||||
import netlifyIdentity from 'netlify-identity-widget'
|
||||
import ReactDOM from 'react-dom'
|
||||
import { RedwoodProvider, FatalErrorBoundary } from '@redwoodjs/web'
|
||||
import FatalErrorPage from 'src/pages/FatalErrorPage'
|
||||
@@ -7,11 +9,15 @@ import Routes from 'src/Routes'
|
||||
import './scaffold.css'
|
||||
import './index.css'
|
||||
|
||||
netlifyIdentity.init()
|
||||
|
||||
ReactDOM.render(
|
||||
<FatalErrorBoundary page={FatalErrorPage}>
|
||||
<RedwoodProvider>
|
||||
<Routes />
|
||||
</RedwoodProvider>
|
||||
<AuthProvider client={netlifyIdentity} type="netlify">
|
||||
<RedwoodProvider>
|
||||
<Routes />
|
||||
</RedwoodProvider>
|
||||
</AuthProvider>
|
||||
</FatalErrorBoundary>,
|
||||
document.getElementById('redwood-app')
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user