atinux / nuxt-auth-utils

Add Authentication to Nuxt applications with secured & sealed cookies sessions.
MIT License
962 stars 90 forks source link

feat: add polar provider #196

Closed ahmedrangel closed 1 month ago

ahmedrangel commented 1 month ago

As requested, this PR closes #173

For testing follow these steps:

  1. Sign up at https://polar.sh/signup
  2. Go to account settings https://polar.sh/settings
  3. Look for OAuth Applications setting
  4. Click New OAuth App
  5. Fill your Application Name
  6. In Client Type, select Confidential Client
  7. In Redirect URIs, add http://127.0.0.1:3000/auth/polar
  8. In Scopes, check openid and email (It's important to check these scopes for fetching user info, otherwise, the endpoint will return error 500)
  9. In Homepage URL, write any URL
  10. Click Create
  11. Copy your Client ID and Client Secret
  12. Add to .env NUXT_OAUTH_POLAR_CLIENT_ID and NUXT_OAUTH_POLAR_CLIENT_SECRET
  13. Test polar auth
pkg-pr-new[bot] commented 1 month ago

Open in Stackblitz

pnpm add https://pkg.pr.new/atinux/nuxt-auth-utils@196

commit: eabe0f5

atinux commented 1 month ago

You rock ❤️