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

fix(sso|auth): fix sso signinup #9651

Merged
merged 1 commit into from
Jan 15, 2025
Merged

fix(sso|auth): fix sso signinup #9651

merged 1 commit into from
Jan 15, 2025

Conversation

AMoreaux
Copy link
Contributor

Renamed user to payload for better context clarity and updated related references. Adjusted the login token generation to use workspace.id, improving readability and maintainability of the code.

Renamed `user` to `payload` for better context clarity and updated related references. Adjusted the login token generation to use `workspace.id`, improving readability and maintainability of the code.
@AMoreaux AMoreaux requested a review from Weiko January 15, 2025 17:28
@AMoreaux AMoreaux self-assigned this Jan 15, 2025
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

Improved SSO authentication flow by renaming parameters and updating workspace reference handling in the login token generation process.

  • Renamed user parameter to payload in generateLoginToken() in packages/twenty-server/src/engine/core-modules/auth/controllers/sso-auth.controller.ts for better semantic clarity
  • Updated workspace reference to use workspace.id from signInUp() return value instead of identityProvider.workspace.id for more reliable workspace identification
  • Improved type safety by ensuring workspace reference comes from the post-authentication state

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

@Weiko Weiko merged commit 789ff30 into main Jan 15, 2025
34 checks passed
@Weiko Weiko deleted the fix/sso-signinup branch January 15, 2025 18:27
Copy link

Fails
🚫

node failed.

Log

�[31mError: �[39m SyntaxError: Unexpected token C in JSON at position 0
    at JSON.parse (<anonymous>)
�[90m    at parseJSONFromBytes (node:internal/deps/undici/undici:5584:19)�[39m
�[90m    at successSteps (node:internal/deps/undici/undici:5555:27)�[39m
�[90m    at fullyReadBody (node:internal/deps/undici/undici:1665:9)�[39m
�[90m    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)�[39m
�[90m    at async specConsumeBody (node:internal/deps/undici/undici:5564:7)�[39m
danger-results://tmp/danger-results-f265c195.json

Generated by 🚫 dangerJS against ce54cf7

pacyL2K19 pushed a commit to pacyL2K19/twenty that referenced this pull request Jan 16, 2025
Renamed `user` to `payload` for better context clarity and updated
related references. Adjusted the login token generation to use
`workspace.id`, improving readability and maintainability of the code.
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