Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added callback url structure for self hosting #7570

Merged
merged 2 commits into from
Oct 10, 2024

Conversation

ShantanuGaur26
Copy link
Contributor

@ShantanuGaur26 ShantanuGaur26 commented Oct 10, 2024

Solves #7442

Added callback url structure in google and microsoft auth for self hosting.

374160284-da3f62d2-68b5-4e28-a038-819463c6ea46

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

This pull request updates the self-hosting documentation for Twenty by adding specific callback URL structures for Google and Microsoft authentication.

  • Added example callback URL structure for AUTH_GOOGLE_APIS_CALLBACK_URL in /packages/twenty-website/src/content/developers/self-hosting/self-hosting-var.mdx
  • Added example callback URL structure for AUTH_MICROSOFT_CALLBACK_URL in the same file
  • Improved clarity for self-hosting setup by providing more specific examples for authentication configuration
  • Potential issue: The added URL structures may need to be reviewed for accuracy and consistency with the actual implementation

1 file(s) reviewed, 3 comment(s)
Edit PR Review Bot Settings | Greptile

@@ -81,7 +81,7 @@ yarn command:prod cron:calendar:calendar-event-list-fetch
['AUTH_MICROSOFT_CLIENT_ID', '', 'Microsoft client ID'],
['AUTH_MICROSOFT_TENANT_ID', '', 'Microsoft tenant ID'],
['AUTH_MICROSOFT_CLIENT_SECRET', '', 'Microsoft client secret'],
['AUTH_MICROSOFT_CALLBACK_URL', '', 'Microsoft auth callback'],
['AUTH_MICROSOFT_CALLBACK_URL', 'http://[YourDomain]/auth/google/redirect', 'Microsoft auth callback'],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: The Microsoft auth callback URL is using the Google redirect path. This should be updated to use a Microsoft-specific path.

@@ -81,7 +81,7 @@ yarn command:prod cron:calendar:calendar-event-list-fetch
['AUTH_MICROSOFT_CLIENT_ID', '', 'Microsoft client ID'],
['AUTH_MICROSOFT_TENANT_ID', '', 'Microsoft tenant ID'],
['AUTH_MICROSOFT_CLIENT_SECRET', '', 'Microsoft client secret'],
['AUTH_MICROSOFT_CALLBACK_URL', '', 'Microsoft auth callback'],
['AUTH_MICROSOFT_CALLBACK_URL', 'http://[YourDomain]/auth/google/redirect', 'Microsoft auth callback'],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Update this to use a Microsoft-specific path, e.g., 'http://[YourDomain]/auth/microsoft/redirect'

Copy link

github-actions bot commented Oct 10, 2024

Fails
🚫

node failed.

Log

�[31mError: �[39m RequestError [HttpError]: You have exceeded a secondary rate limit. Please wait a few minutes before you try again. If you reach out to GitHub Support for help, please include the request ID 1407:2ED03E:1755877:2DAD5BA:6707EC71.
    at /home/runner/work/twenty/twenty/node_modules/�[4m@octokit�[24m/request/dist-node/index.js:86:21
�[90m    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)�[39m {
  status: �[33m403�[39m,
  response: {
    url: �[32m'https://api.github.com/search/issues?q=is%3Apr%20author%3AShantanuGaur26%20is%3Aclosed%20repo%3Atwentyhq%2Ftwenty&per_page=2&page=1'�[39m,
    status: �[33m403�[39m,
    headers: {
      �[32m'access-control-allow-origin'�[39m: �[32m'*'�[39m,
      �[32m'access-control-expose-headers'�[39m: �[32m'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset'�[39m,
      connection: �[32m'close'�[39m,
      �[32m'content-encoding'�[39m: �[32m'gzip'�[39m,
      �[32m'content-security-policy'�[39m: �[32m"default-src 'none'"�[39m,
      �[32m'content-type'�[39m: �[32m'application/json; charset=utf-8'�[39m,
      date: �[32m'Thu, 10 Oct 2024 15:02:09 GMT'�[39m,
      �[32m'referrer-policy'�[39m: �[32m'origin-when-cross-origin, strict-origin-when-cross-origin'�[39m,
      server: �[32m'github.com'�[39m,
      �[32m'strict-transport-security'�[39m: �[32m'max-age=31536000; includeSubdomains; preload'�[39m,
      �[32m'transfer-encoding'�[39m: �[32m'chunked'�[39m,
      vary: �[32m'Accept-Encoding, Accept, X-Requested-With'�[39m,
      �[32m'x-content-type-options'�[39m: �[32m'nosniff'�[39m,
      �[32m'x-frame-options'�[39m: �[32m'deny'�[39m,
      �[32m'x-github-api-version-selected'�[39m: �[32m'2022-11-28'�[39m,
      �[32m'x-github-media-type'�[39m: �[32m'github.v3; format=json'�[39m,
      �[32m'x-github-request-id'�[39m: �[32m'1407:2ED03E:1755877:2DAD5BA:6707EC71'�[39m,
      �[32m'x-ratelimit-limit'�[39m: �[32m'30'�[39m,
      �[32m'x-ratelimit-remaining'�[39m: �[32m'30'�[39m,
      �[32m'x-ratelimit-reset'�[39m: �[32m'1728572589'�[39m,
      �[32m'x-ratelimit-resource'�[39m: �[32m'search'�[39m,
      �[32m'x-ratelimit-used'�[39m: �[32m'1'�[39m,
      �[32m'x-xss-protection'�[39m: �[32m'0'�[39m
    },
    data: {
      documentation_url: �[32m'https://docs.github.com/free-pro-team@latest/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits'�[39m,
      message: �[32m'You have exceeded a secondary rate limit. Please wait a few minutes before you try again. If you reach out to GitHub Support for help, please include the request ID 1407:2ED03E:1755877:2DAD5BA:6707EC71.'�[39m
    }
  },
  request: {
    method: �[32m'GET'�[39m,
    url: �[32m'https://api.github.com/search/issues?q=is%3Apr%20author%3AShantanuGaur26%20is%3Aclosed%20repo%3Atwentyhq%2Ftwenty&per_page=2&page=1'�[39m,
    headers: {
      accept: �[32m'application/vnd.github.v3+json'�[39m,
      �[32m'user-agent'�[39m: �[32m'octokit-rest.js/18.12.0 octokit-core.js/3.6.0 Node.js/18.20.4 (linux; x64)'�[39m,
      authorization: �[32m'token [REDACTED]'�[39m
    },
    request: { hook: �[36m[Function: bound bound register]�[39m }
  }
}
danger-results://tmp/danger-results-5773db01.json

Generated by 🚫 dangerJS against 8be2cc5

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

(updates since last review)

This pull request corrects the Microsoft auth callback URL in the self-hosting documentation for Twenty.

  • Fixed AUTH_MICROSOFT_CALLBACK_URL in /packages/twenty-website/src/content/developers/self-hosting/self-hosting-var.mdx to use '/auth/microsoft/redirect' instead of '/auth/google/redirect'
  • Ensures consistency between the documented callback URL and the actual implementation for Microsoft authentication
  • Improves accuracy of self-hosting setup instructions for Microsoft OAuth integration

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

@ShantanuGaur26
Copy link
Contributor Author

Added callback url structure in google and microsoft auth for self hosting.
374160284-da3f62d2-68b5-4e28-a038-819463c6ea46

Copy link
Member

@charlesBochet charlesBochet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@charlesBochet charlesBochet merged commit bb2e825 into twentyhq:main Oct 10, 2024
2 of 4 checks passed
harshit078 pushed a commit to harshit078/twenty that referenced this pull request Oct 14, 2024
Solves twentyhq#7442

Added callback url structure in google and microsoft auth for self
hosting.


![374160284-da3f62d2-68b5-4e28-a038-819463c6ea46](https://github.com/user-attachments/assets/343943e9-033d-466d-8d68-1a7e7f6faf2e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants