Replacing client side authentication

I’m having a difficult time figuring out how to replace the authentication functionality of Meteor.

For context, I want to replace the Meteor front-end with Ionic, so I need to remove dependencies on Meteor. Also, I’m using GraphQL on the back-end.

Things I’ve tried:

  1. Reverse engineering meteor/useraccounts:core. It would be nice if there are methods I could call on the backend to login a user, but I don’t see anything like that.
  2. Using accounts.js. I’m having a hard time groking the documentation and overall strategy.
  3. Using meteor client bundle. It hasn’t been updated in a long time, so I don’t think it’d be worth my time to continue figuring it out.

Has anybody else done this?


Have you checked this: Accounts (multi-server) | Meteor API Docs

This will still require the use of Meteor’s Accounts to call the login methods

Thank you for the response. I don’t think that would work as it still requires me to use a Meteor package on the client. Is that right?

What you can do is check the code for Account Server and see how authentication is being done.

1 Like

You don’t need any meteor packages on the client.
This is the way I work with my react native project:
All you need is call the login method (via apollo/graphql for example) and store the token somewhere in the client.
After that, you will need to send the token along with your requests.

1 Like

Thanks everyone! I’m digging into the Account Server code and figuring things out. I might post some more questions here to get some feedback on my implementation.