# Websocket after OAuth2 authentication

**URL:** <https://discourse.nodered.org/t/websocket-after-oauth2-authentication/42177>\
**Category:** General\
**Created:** [7 March 2021 00:07 UTC](https://discourse.nodered.org/t/websocket-after-oauth2-authentication/42177 "2021-03-07T00:07:11Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [7 March 2021 18:43 UTC](https://discourse.nodered.org/t/websocket-after-oauth2-authentication/42177/5 "2021-03-07T18:43:37Z")

</div>

An oauth2 flow requires a user to click "allow" via a browser window somewhere in the flow, this needs to be done one time only. Initial authentication is only the first of many steps, the click cannot be done with http request nodes or curl.

See the typical flow according to the RFC guidelines.

 ![oauth2](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/2/e2d4d1a4b618690190b384e04a40875c414d31f9.png)

[More info](https://darutk.medium.com/diagrams-and-movies-of-all-the-oauth-2-0-flows-194f3c3ade85)

There is a [python script for gardena/husqvarna devices available](https://github.com/py-smart-gardena/py-smart-gardena), perhaps easier to implement.

---

_[View the full topic](https://discourse.nodered.org/t/websocket-after-oauth2-authentication/42177)._
