How to verify access token on back-end

Is there any way to verify and get userId on back-end from the access token created by client-side Realm SDK?

My application using Realm authentication, I need to get the user Id to save user created post on back-end, I’m using Couchbase for my post data.

something like firebase admin does link

@chawki I believe you can use an authentication trigger like so -

And then access in context - not sure exactly what you are trying to do but triggers and functions should give you access to user data -

What I’m looking for is something similar to firebase admin.

Here how firebase admin works

  • when user sign with firebase authenticate, firebase creates an access token on the client side
  • We can send the access token to the server-side and with firebase admin, we decode the access token and get the user id.

How to implement this with Realm?

Once you login you can call something like:

var myId = app.currentUser()!.identity!

Thanks @Ian_Ward,

This not what I’m looking for, I think I need to implement the user verification my self.