-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add API changes for invitations and Magic Auth #293
Conversation
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.
context 'with valid payload' do | ||
it 'creates a magic_auth' do | ||
VCR.use_cassette 'user_management/create_magic_auth/valid' do | ||
magic_auth = described_class.create_magic_auth( | ||
email: 'test@workos.com', | ||
) | ||
|
||
expect(magic_auth.id).to eq('magic_auth_01HWXVEWWSMR5HS8M6FBGMBJJ9') | ||
expect(magic_auth.email).to eq('test@workos.com') | ||
end | ||
end | ||
end |
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.
Do we generally test other variations? There is also a version of this method that accepts an invitation.
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.
Sometimes - testing is a bit spotty in the SDKs. The invitation_token is optional for this method, and it's only needed in a specific case: sign ups are turned off and there isn't already a user with the email.
I'll add a follow up item to add a test for that case. I need to get my dashboard in a specific state to do that test.
Description
Adds API changes to support sending your own emails for invitations and Magic Auth.
accept_invitation_url
to invitation object returned by APIget_magic_auth
andcreate_magic_auth
send_magic_auth_code
method in favor ofcreate_magic_auth
Documentation
Does this require changes to the WorkOS Docs? E.g. the API Reference or code snippets need updates.
If yes, link a related docs PR and add a docs maintainer as a reviewer. Their approval is required.
https://github.com/workos/workos/pull/26691