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

Add events and API changes for invitations and Magic Auth #221

Merged
merged 3 commits into from May 3, 2024

Conversation

blairlunceford
Copy link
Contributor

Description

Adds events and API changes to support sending your own emails for invitations and Magic Auth.

  • Adds acceptInvitationUrl to invitation object returned by API
  • Adds new endpoints for the Magic Auth API: getMagicAuth and createMagicAuth
  • Deprecates current sendMagicAuthCode method in favor of createMagicAuth
  • Adds new events for invitation.created and magic_auth.created

Documentation

Does this require changes to the WorkOS Docs? E.g. the API Reference or code snippets need updates.

[x] Yes

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

@blairlunceford blairlunceford self-assigned this May 3, 2024
Copy link

linear bot commented May 3, 2024

DAAP-602 Kotlin SDK

@mattgd
Copy link
Contributor

mattgd commented May 3, 2024

Should this PR be based off of the beta branch since it contains UM additions? Some context here.

@blairlunceford
Copy link
Contributor Author

Should this PR be based off of the beta branch since it contains UM additions? Some context here.

Ah that's my bad - I meant to do that and messed up when creating the PR

@blairlunceford blairlunceford changed the base branch from main to beta May 3, 2024 17:35
@blairlunceford
Copy link
Contributor Author

Ok I selected the correct branch now

* @param createdAt The timestamp when the invitation was created.
* @param updatedAt The timestamp when the invitation was last updated.
*/
data class InvitationEvent @JsonCreator constructor(
Copy link
Contributor

Choose a reason for hiding this comment

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

Confirming my understanding - fetching invitations from the API contains the acceptInvitationUrl key, but the Invitation object returned for events does not, is that correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The API response object contains the token and the acceptInvitationUrl but the event does not, as those are secrets, which we don't want to expose in events. More context in the decision log here: https://workos.quip.com/lLKGA1TcBTrV/User-Management-Configurable-Emails-Decision-Log#temp:C:GRO1a7c777038db4dea886af97c8

@blairlunceford blairlunceford requested a review from mattgd May 3, 2024 18:13
@blairlunceford blairlunceford merged commit d646ece into beta May 3, 2024
4 checks passed
@blairlunceford blairlunceford deleted the feature/daap-602-kotlin-sdk branch May 3, 2024 19:10
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.

None yet

2 participants