Open exonomyapp opened 3 months ago
Test comment to trigger parent child action
Test comment to trigger parent child action
Test comment to trigger parent child action
Test comment to trigger parent child action
Test comment to trigger parent child action
Test comment to trigger parent child action
Test comment to trigger parent child action
Test comment to trigger parent child action
Parents: #4
To add GitHub authentication to https://exosystems.net using Shadcn for UI management, we set up the bare minimum code:
1. Install Necessary Dependencies
First, install the necessary packages. This includes
@nuxt/auth-next
for authentication and@nuxtjs/axios
for making HTTP requests.2. Configure Modules in
nuxt.config.js
Next, configure the
@nuxtjs/auth-next
and@nuxtjs/axios
modules in yournuxt.config.js
.3. Create Authentication UI Components Using Shadcn
Use Shadcn to create a simple button for GitHub login.
4. Handle Authentication in Pages
You can now add authentication checks in your pages. For example, in a
pages/index.vue
:5. Set Up GitHub OAuth Application
Ensure that you've created a GitHub OAuth application and added your
GITHUB_CLIENT_ID
andGITHUB_CLIENT_SECRET
to your environment variables.You can do this in a
.env
file at the root of your project:6. Deploy and Test
Deploy your application and test the GitHub authentication. When a user clicks the "Login with GitHub" button, they should be redirected to GitHub's OAuth flow. Upon successful login, they will be redirected back to your app, where their session will be established.
This is the bare minimum setup required to implement GitHub authentication in a Nuxt.js app using Shadcn for UI management.