- Angular frontend Authentication form with a Supabase PostgreSQL database backend
- Tutorial code from Domini Code - in Spanish
- Note: to open web links in a new window use: ctrl+click on link
- Supabase is an open-source alternative to Firebase, but uses PostgreSQL instead of document database. Database is realtime & can use SQL joins. Realtime notifications via Websockets. RESTful API requires no backend code.
- I had to have CORS Access Control Allow Origin enabled for this to work
npm i
to install dependencies then...
- Create free account with Supabase and setup email auth
- add Supabase credentials to
environments/environment.ts
ng serve
for a dev server. Navigate to http://localhost:4200/
- app will automatically reload if you change any of the source files
npm run build
for a build folder with production configuration
ng test
to execute the unit tests via Karma.
ng e2e
to execute the end-to-end tests via Protractor.
- function to call signout function from auth service & catch errors (by Domini Code)
async onLogout(): Promise<void> {
try {
await this.authSvc.signOut();
} catch (error) {
console.log(error);
}
}
- Supabase user interface is cool to work with.
- User session stored in local storage, cleared upon user logout
- Status: Working
- To-Do: Nothing