ioBroker.admin
ioBroker.admin copied to clipboard
Create a generic way to accept "OAuth Callbacks/Redirects" on Admin and send info to adapter
trafficstars
The idea is that an OAuth flow started via Admin config UI can also end in Admin. We already have a webserver here listening and reachable by the local browser.
Create a route on admin like /oauth2_callbacks/adaptername.instance/ and if this route is called, e.g. http://localhost:8081/oauth2_callbacks/netatmo.0/?state=21hPXNoA5EhibbRP2KOeS16IToEgKlcgUFHxI0vf&code=d507d605a5e44c1f2db579c2177d77d9".
- extract the adapterinstance
- send a message to this instance with command like "OAuthCallbackReceivedByAdmin" containing the Redirect URL as content
- depending on the resllt of the message show (nicely formatted):
- if an error is return show it as error
- if a success message is returned show it as success message
- if a timeout occurs (e.g. callback not answered within 10s or such) show a Timeout error message
The shown page should also contain a close button which tries to close the page
@Apollon77 Can you please check with current admin version if this issue is fixed?
Yes, planned for today