Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Registration and authentication #27

Open
fourstacks opened this issue Apr 14, 2020 · 2 comments
Open

Registration and authentication #27

fourstacks opened this issue Apr 14, 2020 · 2 comments
Assignees
Labels
Epic Feature Outline for feature

Comments

@fourstacks
Copy link
Collaborator

The problem

We want all activity on the application to take place in an authenticated state. Using InertiaJS means that we can use the session-based authentication provided by Laravel out of the box. We've decided to support two modes of registration and authentication:

  1. Email/Password authentication. In this approach the user signs up using an email and a password. During registration we'll also ask for a couple of bits of extra information such as first name, last name and perhaps a display name. A User model will be created in our application that stores these bits of information and this User model can be used in various ways in our application (for example we'll relate mentor/mentee profiles to the User model etc).

  2. Social authentication. In this approach a user can both register and authenticate using a social platform - in this case Slack. On initial sign in, a User model will be created in our application and the details of that User model will be filled from the social platform. On subsequent sign-ins, this User model in our system will be recalled for use.

The approach

Laravel does much of the work we need. We'll need to run the authentication scaffolding:

https://laravel.com/docs/7.x/authentication#authentication-quickstart
https://laravel.com/docs/7.x/frontend#using-react

This will need to be tweaked a little to meet our needs. We can use the Tailwind UI login form component as the basis of our UI:

https://tailwindui.com/components/application-ui/forms/sign-in-forms

With a little effort we'll have basic email/password authentication set up. We'll then need to take a look at Laravel Socialite which we'll use to handle social authentication:

https://laravel.com/docs/7.x/socialite

Socialite comes with many drivers for different social platforms - the Slack one is here:

https://socialiteproviders.netlify.com/providers/slack.html

This should hopefully be a case of following the instructions.


This feature has a reasonable amount of Laravel work so it's worth having at least two people working on this - one with some familiarity with Laravel

@fourstacks fourstacks added the Feature Outline for feature label Apr 14, 2020
@stiffneckjim
Copy link

This feature is now an Epic, a name given to large user stories by people who make money giving things names and then selling books about them. I've created two user stories underneath this epic, so far: one for authenticating with the app using GitHub and the other with Slack.

@AlisonYoon
Copy link
Collaborator

In the laradock directory, run
docker-compose exec workspace bash
and then run
composer require laravel/ui "^1.2"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Epic Feature Outline for feature
Projects
None yet
Development

No branches or pull requests

4 participants