Authorization endpoint URL

kivanych
Posts: 5
Joined: Mon Jan 25, 2021 5:59 pm

Authorization endpoint URL

Postby kivanych » Thu Jun 22, 2023 4:31 pm

Hi guys

From the rainmaker docs it is not clear for me which URL I should use for authorization using OAuth2 method.
I want to control my devices connected to RainMaker using Yandex voice assistant.
So I need to pass OAuth2 authorization from Yandex side and specify RainMaker authorization URL according to this RFC:
https://datatracker.ietf.org/doc/html/r ... ection-3.1

Could you please help me to find the RainMaker authorization URL and how should I use it?

As an example I tried to use scripts from this repository: https://github.com/espressif/esp-rainmaker-cli
When I use https://rainmaker-signin-ui.s3.amazonaws.com/index.html then it passes access_token to localhost for some reason.

Could you please help me to specify correct URL for it to take correctly redirect_uri and other params like this:

state=https%3A%2F%2Fsocial.yandex.ru%2Fbroker2%2Fauthz_in_web%2F0d7726f41b914a6095de5a0f4a09d99e%2Fcallback&redirect_uri=https%3A%2F%2Fsocial.yandex.net%2Fbroker%2Fredirect&response_type=code&client_id=1h7ujqjs8140n17v0ahb4n51m2


Thank you.

kivanych
Posts: 5
Joined: Mon Jan 25, 2021 5:59 pm

Re: Authorization endpoint URL

Postby kivanych » Fri Jun 23, 2023 8:31 am

When I run rainmaker.py login then in the address string of the browser I see the following:
  1. https://rainmaker-signin-ui.s3.amazonaws.com/index.html?port=49776&host_url=https://api.rainmaker.espressif.com/v1/login2&github_url=https://3pauth.rainmaker.espressif.com/oauth2/authorize?&redirect_uri=https://rainmaker-login-ui.s3.amazonaws.com/welcome.html&response_type=CODE&client_id=1h7ujqjs8140n17v0ahb4n51m2&scope=aws.cognito.signin.user.admin%20email%20openid%20phone%20profile&state=port:49776
So how should I change parameters in these string for me to pass access_token to Yandex?
What is the meaning of github_url in this string?

Manali
Posts: 3
Joined: Mon Jun 26, 2023 12:50 pm

Re: Authorization endpoint URL

Postby Manali » Mon Jun 26, 2023 1:28 pm

I understand you are using the public RainMaker and want to add a new skill provider Yandex to it. However, we currently don't support Yandex. Note that just using the auth url wont be sufficient. Adding any new integration requires configurations in RainMaker as well as the respective service, and we do not have plans to support Yandex in the near future. We apologize for any inconvenience caused.

Thank you

kivanych
Posts: 5
Joined: Mon Jan 25, 2021 5:59 pm

Re: Authorization endpoint URL

Postby kivanych » Mon Jun 26, 2023 2:54 pm

Manali wrote:
Mon Jun 26, 2023 1:28 pm
However, we currently don't support Yandex.
Hi Manali,

I know that RainMaker doesn't support Yandex voice assistant.

But my question is about OAuth2: If Rainmaker supports OAuth2 specification then there should be a way when RainMaker gets 'redirect_uri' parameter and sends 'access_token' to it after the user successfully passes authorization window.

So the question is: What URL I should use for RainMaker to send 'access_token' to 'redirect_uri' after successfull authorization?

Thank you.

Manali
Posts: 3
Joined: Mon Jun 26, 2023 12:50 pm

Re: Authorization endpoint URL

Postby Manali » Tue Jun 27, 2023 11:00 am

OAuth2 requires application registration at the server side. In simpler terms, the redirection can happen only to the services whitelisted and configured in RainMaker by us.

What URL to use becomes irrelevant then, as the redirect_uri is not registered in RainMaker on the backend side.

Thank you

Who is online

Users browsing this forum: No registered users and 38 guests