The WorkOS Provider comes with a set of default options:
You can override any of the options to suit your own use case.
WorkOS is not an identity provider itself, but, rather, a bridge to multiple single sign-on (SSO) providers. As a result, we need to make some additional changes to authenticate users using WorkOS.
In order to sign a user in using WorkOS, we need to specify which WorkOS Connection to use. A common way to do this is to collect the user's email address and extract the domain.
This can be done using a custom login page.
To add a custom login page, you can use the
We can then add a custom login page that displays an input where the user can enter their email address. We then extract the domain from the user's email address and pass it to the
authorizationParams parameter on the