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 authentication events #998

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

LauraBeatris
Copy link
Contributor

@LauraBeatris LauraBeatris commented Mar 25, 2024

Description

Adding types/parsing for authentication events.

Documentation

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

[ ] Yes

If yes, link a related docs PR and add a docs maintainer as a reviewer. Their approval is required.

@LauraBeatris LauraBeatris requested a review from a team as a code owner March 25, 2024 20:16
@LauraBeatris LauraBeatris self-assigned this Mar 25, 2024
@LauraBeatris LauraBeatris marked this pull request as draft March 25, 2024 20:16
@LauraBeatris LauraBeatris force-pushed the add-authentication-email-verification-events branch from 59676c0 to 5f34b3e Compare March 25, 2024 20:17
@LauraBeatris LauraBeatris changed the title Add authentication events for EmailVerification entity Add authentication events for email verification Mar 25, 2024
@LauraBeatris LauraBeatris requested review from amygdalama and removed request for oliverzheng March 25, 2024 20:31
@LauraBeatris LauraBeatris marked this pull request as ready for review March 25, 2024 20:31
@LauraBeatris LauraBeatris changed the title Add authentication events for email verification Add authentication events Mar 25, 2024
@LauraBeatris LauraBeatris force-pushed the add-authentication-email-verification-events branch from a04be2d to 39fdd37 Compare March 26, 2024 17:50
@LauraBeatris
Copy link
Contributor Author

@amygdalama Types updated! I'll proceed with testing locally.


export type AuthenticationEvent = {
type: AuthenticationEventType;
email?: string | null;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
email?: string | null;
email: string | null;


export interface AuthenticationEventResponse {
type: AuthenticationEventType;
email?: string | null;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
email?: string | null;
email: string | null;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seems like we're not that consistent with nullable properties, there are a couple of other places that use undefined | null.

I've updated error to | null as well: b972c1d

@LauraBeatris LauraBeatris force-pushed the add-authentication-email-verification-events branch from 20a8dab to ef843cd Compare March 26, 2024 19:53
@LauraBeatris
Copy link
Contributor Author

We'll hold on merging this since not all events are being emitted internally yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants