How do I implement an OAuth2 flow in my UI?

Hi jonathan.timianko

Your snaps are helping me a lot. As I am trying to let 3rd parties to interact with my bubbles app user and get their info as response via Oauth 2.0 agent flow.

Could you explain by example too:

  1. Access token endpoint: should I create a login endpoint and then copy url (example: https://myapp.bubbleapps.io/api/1.1/wf/my_access-token_endpoint)?

  2. User profile endpoint: same as (1) >>create a wf to get user profile? … a bit confused.

Thank you and snapshots are always welcome!

Hi Sam, glad they were helpful. I don’t have much experience with Oauth 2 coming into a bubble app (and actually don’t know if you could do this right now since exposing Oauth2 is on the bubble roadmap page (bubble.is/roadmap), however I think in general the API connector is for when you want to access external services FROM your bubble app, whereas if you want an external service to access your application, what you need to do is go to the API workflows section which is found at the bottom of the menu at the top left that lists all of your pages. From there you would create the endpoint that you just listed above so that an external service to access your bubble app. I do this already for email parsing, so an external email parser would create an inbound call to an API workflow that i define in that menu.

Again, have no experience whatsoever with exposing Oauth2 in an api workflow but going there should get you moving. Let me know if you have any other questions!

-Jonathan

Hi Jonathan,
Thank you for your reply.

Creation of endpoints is fine for me but I am worried about security, I don’t want 3rd parties to fetch bubble app users passwords.
Any other authentication to suggest for a more secured API?

Example:

  1. Bubble app is a wallet
  2. 3rd party is an ecommerce website
  3. User wants to pay with his credit (bubble app)

=> I want to let 3rd party integrate bubble app as payment way which implies login first (go to url) in order to make sure only one user will be debited.

Open to suggestions other than Oauth 2.0. Thanks

Sam

Gotcha. Don’t have much experience in this area sorry about that, but if I think of anything down the road or come up with something will let you know!

Actually did you check out the stripe.js plugin?

Thanks

Is this logging in of the first oauth account, what would explain my issue posted here? What are people doing in order to use the API Connector for api calls, not social login?

This is what i want to know also… I guess this plugin should be more generic…