NangoHQ / nango

A single API for all your integrations.
https://www.nango.dev
Other
4.33k stars 382 forks source link

Add a REST endpoint that returns a url to start the auth process #2190

Open parisetflorian opened 1 month ago

linear[bot] commented 1 month ago

NAN-1008 Add a REST endpoint that returns a url to start the with

bastienbeurier commented 2 weeks ago

Could you please tell us more about your use-case?

A quick workaround for this is that you host a very simple web page with a button to connect, using our frontend SDK.

parisetflorian commented 2 weeks ago

Yes that’s what I did but : 1 - It had an extra unnecessary step. 2 - I currently can't get Nango to to work on Safari mobile

Here’s my use case:

What I want to be able to call the REST API with the same parameters taken by the nango.auth() function that returns the URL to redirect the user to. Example : https://www.notion.so/install-integration?response_type=code&client_id=401588b7-da90-498e-8948-XXXX&redirect_uri=https%3A%2F%2Fapi.nango.dev%2Foauth%2Fcallback&state=533f5390-2a64-11ef-8b40-XXXX&owner=user Then I can shortlink that URL to something pretty and pass it on the Whatsapp conversation.

bastienbeurier commented 2 weeks ago

I understand. Unfortunately, our frontend SDK currently works in a way that would be complex to reproduce with a pure link.

It's possible, but it requires more work than we can put in now. Here are a couple examples of what we need to change:

The best workaround is to host a very simple page which calls nango.auth(). We will most likely implement it this way anyway when we will support authorizing users via a link.

parisetflorian commented 2 weeks ago

Thanks for the detailed answer. I have already implemented the workaround but still have the issue with: https://github.com/NangoHQ/nango/issues/2189

bastienbeurier commented 2 weeks ago

Understood, we'll look into this other issue asap.