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

Registration and authentication #27

@fourstacks

Description

@fourstacks

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

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions