-
Notifications
You must be signed in to change notification settings - Fork 0
feat: guest migration #141
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
Conversation
jjchen01
commented
Sep 17, 2025
- Add IsGuest to user to identify the user is guest
- Promote guest users to non-guest users using Google login.
}) | ||
return | ||
} | ||
if exists == nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should move the logic below to the use case if it's reusable when integrating a new OIDC provider, but leave it as is for now, since premature optimization is the root of all evil.
IsGuest: true, | ||
}) | ||
if err != nil { | ||
reqCtx.AbortWithStatusJSON(http.StatusOK, responses.ErrorResponse{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's note related but the http.StatusOK with response object
user, err := authRoute.authService.RegisterUser(ctx, &user.User{ | ||
Name: fmt.Sprintf("Jan-%s", randomStr), | ||
Email: fmt.Sprintf("Jan-%[email protected]", randomStr), | ||
Email: fmt.Sprintf("Jan-%s@guest.jan.ai", randomStr), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we get shorter email ( like get first 12 char )
And if guest user can register with organization and project in RegisterUser flow. is that fine?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The organization and project will be created during user registration (OpenAI implements it this way).
There is no need to assign an organization ID from the admin endpoints they provide:
curl https://api.openai.com/v1/organization/projects?after=proj_abc&limit=20&include_archived=false
-> We can revert this change when we have a back office UI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
few minor comments. lgtm