cogentapps / chat-with-gpt

An open-source ChatGPT app with a voice
https://www.chatwithgpt.ai
MIT License
2.31k stars 495 forks source link

Support Oauth/SSO #127

Open raldone01 opened 1 year ago

raldone01 commented 1 year ago

It would be nice if there was a setting to prevent usage without Login.

ricopollantecs commented 1 year ago

ff on this

raldone01 commented 1 year ago

What does that mean?

ricopollantecs commented 1 year ago

following

matthid commented 1 year ago

I could successfully setup the application with a wso2 identity server instance by using the auth0 configuration section and adding the token endpoint as the issuer... so maybe this already works for some scenarios?

bsu3338 commented 1 year ago

I was able to setup AzureAD authentication, creating a quick howto in case you want to add it to the README or a separate file.

Azure AD

  1. Sign in to the Azure Portal
  2. Search for and select Azure Active Directory
  3. Select App registrations > New registration
  4. Enter a display Name
  5. Choose Web
  6. Enter https://FQDN/chatapi/login-callback
  7. Select Overview
  8. Note of the Application (client) ID and Directory (tenant) ID
  9. Select Authentication
  10. Check Access tokens and IT tokens
  11. Select Certificates & Secrets
  12. Create a secret and note the value

config.yaml of chat-with-gpt

authSecret: **Secret created in step 11**

auth0:
  clientID: **Application (client) ID**
  issuer:  https://login.microsoftonline.com/**Directory (tenant) ID**/

publicSiteURL: https://FQDN
ricopollantecs commented 1 year ago

Someone done it with google oauth2 ?