issue-129 Add custom auth ui/ux
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { AuthProvider } from '@redwoodjs/auth'
|
||||
import netlifyIdentity from 'netlify-identity-widget'
|
||||
import GoTrue from 'gotrue-js'
|
||||
|
||||
import ReactDOM from 'react-dom'
|
||||
import { RedwoodProvider, FatalErrorBoundary } from '@redwoodjs/web'
|
||||
import FatalErrorPage from 'src/pages/FatalErrorPage'
|
||||
@@ -16,8 +17,6 @@ import './cascade/css/main.css'
|
||||
import 'monaco-editor/min/vs/editor/editor.main.css'
|
||||
import './index.css'
|
||||
|
||||
netlifyIdentity.init()
|
||||
|
||||
function initCascadeStudio() {
|
||||
// if ('serviceWorker' in navigator) {
|
||||
// navigator.serviceWorker.register('service-worker.js').then(function(registration) {
|
||||
@@ -49,9 +48,14 @@ function initCascadeStudio() {
|
||||
}
|
||||
initCascadeStudio()
|
||||
|
||||
const goTrueClient = new GoTrue({
|
||||
APIUrl: 'https://cadhub.xyz/.netlify/identity',
|
||||
setCookie: true,
|
||||
})
|
||||
|
||||
ReactDOM.render(
|
||||
<FatalErrorBoundary page={FatalErrorPage}>
|
||||
<AuthProvider client={netlifyIdentity} type="netlify">
|
||||
<AuthProvider client={goTrueClient} type="goTrue">
|
||||
<RedwoodProvider>
|
||||
<Routes />
|
||||
</RedwoodProvider>
|
||||
|
||||
Reference in New Issue
Block a user