Hello, we want to use tKey SDK to retrieve a public/private key pair for an authenticated user.
Authentication uses Google Identity Services (OAuth) but it happens previous to the initialization of the tKey SDK.
My question is, if we have the id/access tokens from Google login, can we initialize the tKey without calling triggerLogin() function?
Or maybe what we need is to pass Google authentication response to triggerLogin via hash and queryParameters parameters. Is there documenation or an example for this?
triggerLogin() is require to retrieve the social login share which is needed for the the tkey reconstruction.
From my understanding of your question, it seems you would like to avoid to prompt user to sign in which is possible by bring in your own jwt provider (where you handle all the social login and provide the idToken as well as the jwks server).
You will need to reconfigure this at the dashboard and setup a jwks server which generate the idToken
With this, you can pass the idToken to triggerLogin and this will not prompt user to social site sign in page.
Thanks for your response @cherngwoei .
We don’t want to build our own jwt provider but use Google sign in.
However, when the user goes to the ‘wallet’ functionality and the tkey reconstruction is needed, the user has already signed in on our application. Therefore, we have a tokenid and accesstoken from Google services and we’d like to perform tkey reconstruction without showing again the sign in screens.
triggerLogin accepts hash and queryParameters as input. Is there any documentation about these parameters?
++ to this question.
I also need the same functionality for authorization via google in the chrome extension. See this issue
Google authorusation redirects to the new page! insted of returning the auth share to calling code. So need to pass this auth share from site to extension via window.postMessage() and inject it to tKey sdk somehow.