Best options for third party/oauth sign in via React component instead of {{> loginButtons}}?

Hi! I’m running into an issue with third-party oAuth sign in and React - any oAuth sign in configuration for Meteor is currently accessed through the {{> loginButtons}} Blaze template drop-in - and there is no equivalent for oAuth to create a login component using Meteor.loginWithPassword() (which allows us to create our own login form for the accounts-password package functionality). I’d like to make a clean break from Blaze, as wrapping the template is cumbersome and worse still, the logged in state for an oAuth user shows no information about the user, just a caret where the username should be.

I can create a third party login screen to authenticate a user via React Context using an oAuth flow, but it would be an absolute sin to not have this integrated with Meteor’s User Accounts functionalities so the oAuth user is recognized as a user in Meteor’s system. Any solutions would be welcomed.

Hi, is your React view part of the Meteor client or is it a third party to your Meteor project? I am not sure I understand your “third-party” here. If you just want to move from Blaze to React in the same Meteor project, things are pretty simple.

No no, React is installed in the typical fashion (meteor npm install react react-dom … etc.) for a project that has been transitioned from Blaze to React on the front end. What I’m referring to with “third party” is the ability to sign in to a Meteor application with existing login details from another service (ie - Facebook, Google), after that oAuth configuration package has been installed (meteor install accounts-facebook, for example).

My issue is that the ability to set up and use third party login functionality is accessed via Blaze’s {{>loginButtons}} template - if you were to install any of these oAuth configuration packages but not have accounts-ui installed, you can’t use them, and that’s a problem if your front end is no longer written with Blaze. The accounts-password package has a workaround - you can simply create a form that called Meteor.loginWithPassword({}) on submit and that will effect the login, but that only works with native Meteor user accounts. It doesn’t work with the oAuth service configurations though, because those are set up to funnel through the accounts-ui package’s {{>loginButtons}} template. I’m asking if anyone has found a workaround for this roadblock, because I haven’t yet and I don’t want to exclude the oAuth functionality I had before from my app.

paulailincai (Dubai UAE) on skype pls and will sort this out.

Sent you a message :slight_smile: