Francisco "Klogan" Barros
KKinde
•Created by Francisco "Klogan" Barros on 8/19/2024 in #💻┃support
[help] custom sign-up and sign-in pages
Hey folks. I am currently implementing passwordless sign-up and sign-in with custom screens. Using Forms. I have an issue:
- When users are on the sign-in page, insert their email on the input field and submit the form, if the email is unknown to Kinde the user is redirect to Kinde's sign-in page (the one that can be customized through the Kinde website which I do not want to render). Ideally, I would like to show an error on the Form or even better redirect the user to the sign-up page (the one that exists within the source code project). How can this be achieved?
5 replies
KKinde
•Created by Francisco "Klogan" Barros on 8/16/2024 in #💻┃support
[authentication] custom sign up using react
Hey folks. I was following along this page https://docs.kinde.com/authenticate/custom-configurations/custom-authentication-pages/ because I am trying to add a custom
sign-up
and sign-in
screens. However, I do not quite understand the steps to call sign-in
login
function with user email and password, and I also do not understand or see how registration can be done with a custom sign-up screen.
In short, I want to have my own sign-up
/sign-in
forms in react, to ensure the form experience and error handling is the same across the entire application.7 replies
KKinde
•Created by Francisco "Klogan" Barros on 6/30/2024 in #💻┃support
[react-sdk][react-native-sdk (expo)] recommendation for integration testing mocks
Hey folks. I'm wondering if you Kinde team provides any recommendation on how to setup a mock
KindeProvider
for React SDK
or for React Native SDK
?
I don't really know the implementation details and I'm wondering what's the best way to go about this endeavor. For example, on one of my personal projects were the Authorization is made in-house, I use MSW
to intercept login
/logout
requests and return responses that the HTTP Clients
can handle just as if they would real HTTP requests. Which thus leads for the application to be in auth
or anonymous
modes. This works well for me and gives high level of confidence on some more complex integration tests, but is only possible because I know all the details.
Using Kinde SDK on the other hand makes this a bit more complex as I don't know all the endpoints that can be called by the SDK and the exact shape of all responses. I wonder if using a simple provider that exposes a bunch of jest.fn()
functions would be the best option for me. The downside here is that performing a successful login won't actually reflect on the test state, making integration tests a bit shallow. We could argue I could test login via E2E using playwright (react) and detox (react-native) instead. Leaving integration tests only for "fully" authenticated or not authenticated at all tests.
Do you have an existing example of your own mock providers?5 replies