Demonstrates adding authentication methods as plugins for Vue/Quasar.
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
To get a local copy up and running follow these simple steps.
This is an example of how to list things you need to use the software and how to install them.
- npm
npm install npm@latest -g
- Firebase account
- Clone the repo
git clone https://github.com/34fame/sandbox-authn.git
- Install NPM packages
npm install
- Create client environment files
cd client
cp .env.template .env.development
cp .env.template .env.production
- Update environment files with Firebase project details
In order to support the Firebase Authentication methods a boot file for Firebase was created. It initializes a Firebase application instance as well as the auth service and the appropriate auth providers (e.g. Facebook, GitHub , etc.).
Under client/src/services
you'll find core code for standing up authentication (and storage) options for the
application. These services get called directly by your Vuex actions (or from your components). These services
rely on plugins.
A service at a minimum contains an index.js
which exports all functions provided by the service.
A service will always contain a plugins.js
file which is what locates and includes plugins for that service.
The authn service also contains a Vuex store ("auth") and the basic components for authentication (e.g. Login , Register, Logout, etc.).
The client/src/plugins
directory contains all currently installed plugins, organized by their type. Right now the
only included authentication plugin is for Firebase. This plugin has support for many of the Firebase
Authentication service methods:
- Email/Password
- Phone (SMS)
- GitHub
A plugin must contain an index.js
which exports all functions provided by the plugin. These functions must match
the requirements of the service they support. For example, an authn
plugin must provide methods:
- register
- isAuthenticated
- login
- logout
Ideally a plugin would contain other artifacts that are unique to that plugin such as components.
...more details to come.
Authentication plugins are for developers. This means they would be added to an application in much the same way a Quasar App Extension works. Once installed the developer should be able to easily integrate its capabilities into their application with little effort.
This does assume the application is already using our authentication service.
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
Troy Moreland - @34fame_troy
Project Link: https://github.com/34fame/sandbox-authn