Hey everyone,
I’m working on integrating guest accounts in Unreal Engine using the RPM-SDK with the native avatar creator, and I could really use some help!
Here’s what I’ve got so far:
My API server creates a user on my subdomain, links the userId to a database field, and returns a 15-second token in Unreal.
For the native Unreal avatar creator, I managed to achieve guest login by opening a hidden in-game browser and passing in the short-lived token (https://{your-subdomain}.readyplayer.me/avatar?frameApi&token={token}). Then, I am grabbing the token from LocalStorage with the persist:user field and modified the Unreal plugin to use this token with a new C++ GuestLogin blueprint node (similarly to Anonymous login, that takes this token). But, this isn’t the best solution as it relies on a browser.
Full authorization for guest accounts:
Is there an endpoint that returns a “long-lived” JWT from the 15-second guest login token on behalf of the user?
When inspecting local storage in Chrome, I noticed a field called persist:user which holds all my data, including a JWT and Refresh Token etc. Is there an API call (endpoint) I can use to get back these persist:user fields for use in Unreal and on my web API (e.g., to list avatars for the user)? Seems like this is being handled on your servers when I pass the token into the “frameApi&token=” and I am hoping there is a way for me as a developer to do this.
Are there any plans on bringing guest accounts to the Unreal SDK?
Another issue I’m facing:
I’ve followed the Account Linking Guide, but if I’m already logged in and pass a new token for a different user in the same browser session, it doesn’t properly switch to the new user. The persist:user field stays the same as the previous login, not updating to the new user.
Has anyone run into similar issues or have any tips on how to handle this better? Any advice would be greatly appreciated!
Thanks in advance!