dagmawibabi / TelegramCommunityGallery

https://telegram.dagmawi.dev
MIT License
74 stars 16 forks source link

Added User Authentication With Auth.js #18

Closed BaslaelWorkineh closed 4 months ago

BaslaelWorkineh commented 4 months ago

If there is going to be a vote system you will need it (Like Stack Overflow).

vercel[bot] commented 4 months ago

@BaslaelWorkineh is attempting to deploy a commit to the dagmawibabi's projects Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] commented 4 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
telegram ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 10, 2024 7:42am
dagmawibabi commented 4 months ago

Would love to see screenshots cause dev build is failing

BaslaelWorkineh commented 4 months ago

Screenshot 2024-05-10 032120 Screenshot 2024-05-10 032204 Screenshot 2024-05-10 032251

BaslaelWorkineh commented 4 months ago

did you setup the .env file before deploying dagi? I have committed a .env.example file to show what the .env looks like.

dagmawibabi commented 4 months ago

Oh that looks wonderful. Where can I get the env vars? The GitHub client ID and stuff?

BaslaelWorkineh commented 4 months ago

You can get it from your GitHub page.

1 Go to setting 2 at the bottom you will find Developers Settings 3 click OAuth Apps 4 click new OAuth App

then GitHub will give you the Client Key and the Secret Key. for the AUTH_SECRET you could use openssl rand -hex 32 on cmd or gitbash

dagmawibabi commented 4 months ago

image image

I am having trustHost error on the preview once every variable was set up, can you look into this?

BaslaelWorkineh commented 4 months ago

Sure I think I forgot to set trustHost:true

      const authConfig = {
              providers: [githubProvider],
              trustHost: true,
              secret: "true"
          };

on hooks.server.ts

And also if you want to check it out here is a test deployment TestDeployment

dagmawibabi commented 4 months ago

EPIC JOB! PRECISE! EFFECTIVE AND GREAT ADDITION!