We are integrating a Unity app with a Meteor backend.
Using unity-ddp, we can successfully authenticate with the Meteor server via DDP, and we’re also able to get the auth token generated for this connection.
In addition to this direct connection, we’ve added a web-view to Unity to show the user interface of the Meteor app as needed. To prevent an additional login, we would like to hand over the auth token we got via DDP to the web view (e.g. via a URL parameter).
Is this possible somehow, with the standard Meteor accounts packages?
I’ve found this separate package, but I’m not sure if this is really needed:
I would believe you can pass the auth token to the meteor app, as you said via URL parameter for example, and then parse it in the route controller/function and call Meteor.loginWithToken before rendering the content…
One question on this, because I cannot find the right spot in the docs: How exactly would your solution help to login a user in Unity and in an embedded web-view at the same time? This is what I was originally asking for.
I can see that the LoginResult returns a login token; but would this token also be accepted by Meteor if I access it via an embedded web browser?
Ah, I see now. You want to share a login token from inside Unity to a web view hosted inside the Unity application, which also visits a meteor website.
I had a look at this package now. It has quite a number of unresolved issues, with some dating back to 2016. Is this really actively developed? Especially the potential concurrency issue concerns me a bit.
I‘m currently thinking about an integration where Meteor is also running inside the Unity app (i.e. by integrating the Cordova part of Meteor with Unity). This would give the app some offline capabilities Have you ever considered such an approach?