MPC Core Kit Web SDK authentication with thirdparty service

Hi there,

I’m working with Web3Auth and the MPC Core Kit Web SDK. I have a question about setting up custom authentication, like using Stytch.

  1. JWT Tokens: I know we need to provide a JWKS endpoint and a JWT verifier ID. But do we also need a JWT token for each user? I’m confused because each user has a different JWT token.
  2. Integrating Stytch: How do I add a third-party service like Stytch for custom authentication? I checked the example codes and only found Google login. I didn’t see any examples for custom auth with the @web3auth/mpc-core-kit library.

Can someone help me understand these two points or point me to some examples ?

@mago Welcome Aboard!

Your request has been forwarded to our Dev team and we will get back with further updates.

Hello @mago , thanks for asking question. welcome!

  1. Yeah you are right, every single user has different jwt token, and there is a field to paste jwt token.
    you don’t need to paste the jwt token since it’s optional.
  2. I think you need an example with custom jwt right?
    Unfortunately, currently we only have sfa web example with custom jwt login.
    refer to this example and try to utilize it into your mpc core kit project. Thanks.
    https://github.com/Web3Auth/web3auth-core-kit-examples/tree/7d78e7e0d18396ad85deeb09f1f81a83ffde85f9/single-factor-auth-web/sfa-web-custom-jwt-example

Oh awesome! Thank you that worked. I’ve got last question about the popup window. Do you guys use window.postMessage whenever a user is requesting some sort of oauth credentials ? Can you tell me how that is being done in a nutshell ?