https://github.com/andrewjbateman/ionic-angular-authuser
:clipboard: Ionic-Angular used to authenticate users so they can access a simple chat app. Take care if updating.
https://github.com/andrewjbateman/ionic-angular-authuser
angular angular15 authentication firebase firebase9 ionic ionic6
Last synced: 2 months ago
JSON representation
:clipboard: Ionic-Angular used to authenticate users so they can access a simple chat app. Take care if updating.
- Host: GitHub
- URL: https://github.com/andrewjbateman/ionic-angular-authuser
- Owner: AndrewJBateman
- License: mit
- Created: 2020-10-21T16:30:23.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-02-17T19:48:42.000Z (over 2 years ago)
- Last Synced: 2025-05-07T03:43:43.926Z (2 months ago)
- Topics: angular, angular15, authentication, firebase, firebase9, ionic, ionic6
- Language: TypeScript
- Homepage:
- Size: 1.67 MB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# :zap: Ionic Angular Authentication
* Ionic app to authenticate users so they can access and post messages to a chat board.
* Another great tutorial from [Simon Grimm 'Building an Ionic Firebase Chat with Authentication'](https://www.youtube.com/watch?v=xNleEVG9_yA&t=94s). Updated to latest Angular and Firebase (compat) versions.
* **Note:** to open web links in a new window use: _ctrl+click on link_


## :page_facing_up: Table of contents
* [:zap: Ionic Angular Authentication](#zap-ionic-angular-authentication)
* [:page_facing_up: Table of contents](#page_facing_up-table-of-contents)
* [:books: General info](#books-general-info)
* [:camera: Screenshots](#camera-screenshots)
* [:signal_strength: Technologies](#signal_strength-technologies)
* [:floppy_disk: Setup](#floppy_disk-setup)
* [:computer: Code Examples](#computer-code-examples)
* [:cool: Features](#cool-features)
* [:clipboard: Status & To-do list](#clipboard-status--to-do-list)
* [:clap: Inspiration](#clap-inspiration)
* [:file_folder: License](#file_folder-license)
* [:envelope: Contact](#envelope-contact)## :books: General info
* Firebase Firestore Authentication used to create sign in and log in functions
* Firebase Cloud Firestore stores users and messages in Collections.
* [Angular FormBuilder](https://angular.io/api/forms/FormBuilder#description) used to reduce the amount of boilerplate needed to build a form
* rxjs map and switchmap operators used## :camera: Screenshots

## :signal_strength: Technologies
* [Ionic v6](https://ionicframework.com/)
* [Ionic/angular v6](https://ionicframework.com/)
* [Angular v15](https://angular.io/)
* [Firebase v9](https://firebase.google.com/) backend database and authentication APIs## :floppy_disk: Setup
* Create a Firebase project and add email authentication
* Add Firebase config object to environment variables
* `npm` i to install dependencies
* `ionic serve` to start the server on _localhost://8100## :computer: Code Examples
* extract from `chat.page.html` by [Simon Grimm](https://devdactic.com/) showing ternery expressions to change chat offset and scss class depending on user
```html
{{ message.fromName }}
{{ message.msg }}
{{ message.createdAt?.toMillis().toString() | date:'short' }}
```## :cool: Features
* Use of ternery expressions to change chat box color and horizontal offset depending on which user chat item is shown
## :clipboard: Status & To-do list
* Status: Complete and working. Problem with dev. console persisting user login id which stops chat from showing user details correctly
* To-do: Fix errors. Find out how to show more than one user email in chat with email username - problem is likely due to storing of user data even after logging out and logging in as a different user.## :clap: Inspiration
* [Simon Grimm Youtube: 'Building an Ionic Firebase Chat with Authentication'](https://www.youtube.com/watch?v=xNleEVG9_yA&t=94s)
* [Simon Grimm Article: 'Building an Ionic Firebase Chat with Authentication'](https://devdactic.com/ionic-firebase-chat/)## :file_folder: License
* This project is licensed under the terms of the MIT license.
## :envelope: Contact
* Repo created by [ABateman](https://github.com/AndrewJBateman), email: [email protected]