You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.
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:
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).
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:
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:
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.
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:
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).
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
The text was updated successfully, but these errors were encountered: