teebot
02/16/2022, 10:38 AMteebot
02/16/2022, 10:39 AMgetAccessTokenPayloadSecurely
?teebot
02/16/2022, 10:39 AMrp_st
02/16/2022, 10:40 AMgetAccessTokenPayloadSecurely
is in RN land, so it's not available in native land.rp_st
02/16/2022, 10:40 AMteebot
02/16/2022, 10:40 AMrp_st
02/16/2022, 10:40 AMteebot
02/16/2022, 10:40 AMrp_st
02/16/2022, 10:41 AMrp_st
02/16/2022, 10:41 AMnkshah2
02/16/2022, 10:50 AMnkshah2
02/16/2022, 10:51 AMnkshah2
02/16/2022, 10:52 AMteebot
02/16/2022, 10:58 AMteebot
02/16/2022, 10:58 AMrp_st
02/16/2022, 10:59 AMrp_st
02/16/2022, 10:59 AMnkshah2
02/16/2022, 11:01 AMrp_st
02/16/2022, 11:02 AMrp_st
02/16/2022, 11:04 AMgetAccessTokenPayloadSecurely
function. Then that can be added as an authorisation bearer token to the request made by the third party, and your APIs would then need to also be able to verify a JWT as an alternate was of doing sessions.teebot
02/16/2022, 11:09 AMteebot
02/16/2022, 11:11 AMgetAccessTokenPayloadSecurely
? it seemed to be only the payload of the JWT without its signatureteebot
02/16/2022, 11:12 AMsFrontToken
as JWT token ?rp_st
02/16/2022, 11:14 AMgetAccessTokenPayloadSecurely
.
If you enable JWT, we create a separate JWT and put that inside the session's access token payload with the key as jwt
(by default).
So if you do await getAccessTokenPayloadSecurely()["jwt"]
, you will actually get the JWT string which you can then pass to your backendteebot
02/16/2022, 11:26 AM{
"phoneNumber": "+32468214620"
}
rp_st
02/16/2022, 11:26 AMrp_st
02/16/2022, 11:26 AMteebot
02/16/2022, 11:28 AMteebot
02/16/2022, 11:28 AMrp_st
02/16/2022, 11:28 AMteebot
02/16/2022, 11:28 AMrp_st
02/16/2022, 11:28 AMteebot
02/16/2022, 12:43 PMSession.init({
jwt: {
enable: true
}
})
teebot
02/16/2022, 12:44 PMconst session = await Session.createNewSession(
input.options.res,
user.id,
{
// we are adding the phoneNumber to the access token payload.
// This will also be accessible in all API calls + on the frontend.
phoneNumber
},
{}
);
rp_st
02/16/2022, 12:44 PMrp_st
02/16/2022, 12:45 PMnkshah2
02/16/2022, 12:50 PMnkshah2
02/16/2022, 12:50 PMteebot
02/16/2022, 12:52 PMteebot
02/16/2022, 12:52 PMrp_st
02/16/2022, 12:53 PMnkshah2
02/16/2022, 1:02 PMteebot
02/16/2022, 1:27 PMteebot
02/16/2022, 1:27 PM