|
| 1 | +<p align="center"> |
| 2 | + <img src="https://github.com/beyondscript/Laravel-Multi-Auth/blob/main/public/assets/img/favicon.png" width="60" height="60" margin-left="auto" margin-right="auto" alt="Logo"> |
| 3 | + <br> |
| 4 | + Laravel Multi Auth |
| 5 | +</p> |
| 6 | + |
| 7 | +## About Laravel Multi Auth |
| 8 | + |
| 9 | +Laravel Multi Auth is a web application which was designed by using HTML, CSS and JavaScript and developed by using PHP and Laravel framework. |
| 10 | + |
| 11 | +This website was built for learning Laravel Multiple role based Authentication. |
| 12 | + |
| 13 | +## How to use? |
| 14 | + |
| 15 | +<strong>Step - 1:</strong> |
| 16 | +<br> |
| 17 | +Download or clone the repository |
| 18 | + |
| 19 | +<strong>Step - 2:</strong> |
| 20 | +<br> |
| 21 | +Intall all the dependencies by running these commands "composer update" and "npm install" |
| 22 | + |
| 23 | +<strong>Step - 3:</strong> |
| 24 | +<br> |
| 25 | +Copy the .env.example file from root directory to root directory then rename the copied file to .env |
| 26 | + |
| 27 | +<strong>Step - 4:</strong> |
| 28 | +<br> |
| 29 | +Generate new application key by running the command "php artisan key:generate" |
| 30 | + |
| 31 | +<strong>Step - 5:</strong> |
| 32 | +<br> |
| 33 | +Create a new database and import the laravelmultiauth.sql file |
| 34 | + |
| 35 | +<strong>Step - 6:</strong> |
| 36 | +<br> |
| 37 | +Add the database details in the .env file by editing the .env file like below: |
| 38 | + |
| 39 | +DB_DATABASE=database_name |
| 40 | +<br> |
| 41 | +DB_USERNAME=database_user_name |
| 42 | +<br> |
| 43 | +DB_PASSWORD=database_user_password |
| 44 | + |
| 45 | +<strong>Step - 7:</strong> |
| 46 | +<br> |
| 47 | +Create a new email account and add the email account details in the .env file by editing the .env file like below: |
| 48 | + |
| 49 | +MAIL_MAILER=smtp |
| 50 | +<br> |
| 51 | +MAIL_HOST=email_account_host.com |
| 52 | +<br> |
| 53 | +MAIL_PORT=465 |
| 54 | +<br> |
| 55 | +MAIL_USERNAME=email_account_user_name |
| 56 | +<br> |
| 57 | +MAIL_PASSWORD=email_account_password |
| 58 | +<br> |
| 59 | +MAIL_ENCRYPTION=ssl |
| 60 | +<br> |
| 61 | +MAIL_FROM_ADDRESS=email_account |
| 62 | +<br> |
| 63 | +MAIL_FROM_NAME="${APP_NAME}" |
| 64 | + |
| 65 | +<strong>Step - 8:</strong> |
| 66 | +<br> |
| 67 | +Add the application name in the .env file by editing the .env file like below: |
| 68 | + |
| 69 | +APP_NAME="your_app_name" |
| 70 | + |
| 71 | +<strong>Step - 9:</strong> |
| 72 | +<br> |
| 73 | +Add the application url in the .env file by editing the .env file like below: |
| 74 | + |
| 75 | +APP_URL=your_application_url |
| 76 | + |
| 77 | +<strong>Step - 10:</strong> |
| 78 | +<br> |
| 79 | +Add Facebook, GitHub and Google OAuth credentials in the .env file by editing the .env file like below: |
| 80 | + |
| 81 | +FACEBOOK_CLIENT_ID=facebook_client_id |
| 82 | +<br> |
| 83 | +FACEBOOK_CLIENT_SECRET=facebook_client_secret |
| 84 | + |
| 85 | +GITHUB_CLIENT_ID=github_client_id |
| 86 | +<br> |
| 87 | +GITHUB_CLIENT_SECRET=github_client_secret |
| 88 | + |
| 89 | +GOOGLE_CLIENT_ID=google_client_id |
| 90 | +<br> |
| 91 | +GOOGLE_CLIENT_SECRET=google_client_secret |
| 92 | + |
| 93 | +<strong>Step - 11:</strong> |
| 94 | +<br> |
| 95 | +Build the assets by running the command "npm run build" |
| 96 | + |
| 97 | +<strong>Step - 12:</strong> |
| 98 | +<br> |
| 99 | +Delete the node_modules folder from the root directory |
| 100 | + |
| 101 | +## Note |
| 102 | + |
| 103 | +<strong>Facebook Callback/Redirect Url:</strong> |
| 104 | +<br> |
| 105 | +your_application_url/auth/facebook-callback |
| 106 | + |
| 107 | +<strong>GitHub Callback/Redirect Url:</strong> |
| 108 | +<br> |
| 109 | +your_application_url/auth/github-callback |
| 110 | + |
| 111 | +<strong>Google Callback/Redirect Url:</strong> |
| 112 | +<br> |
| 113 | +your_application_url/auth/google-callback |
| 114 | + |
| 115 | +<strong>Admin Credentials:</strong> |
| 116 | +<br> |
| 117 | + |
| 118 | +<br> |
| 119 | +Admin password is: 12345678 |
| 120 | + |
| 121 | +## When a problem is found? |
| 122 | + |
| 123 | +Do not hesitate to message me when you found any problem. |
| 124 | +<br> |
| 125 | +<a href="https://www.facebook.com/engrmdnafiulislam/">Facebook</a> |
| 126 | +<br> |
| 127 | +<a href="https://www.instagram.com/engrmdnafiulislam/">Instagram</a> |
0 commit comments