Hi,
I’m looking for information whether it’s possible to implement an authorization code flow in a custom integration. I want to utilize the standard flow, therefore I’d need to open a pop-up/new tab where the user can sign-in and redirect back to Home Assistant after successful authentication to catch the auth code.
If you have other suggestions (the auth code is not optional, as the service I’m integrating with requires it) I’m open for it.
Hi, that should be possible.
You’ll need to use a config flow to make it work (that’s generally the best UX anyway, IMO).
Here’s the relevant documentation:
External steps in config flow
General OAUTH2 stuff
Thanks, the external step stuff looks good! The other thing seems to be only applicable for client credential flows unfortunately…
Hi, @zweckj did you make it work? I’m trying to do the same, so that users would be able to log in using their existing credentials (username, password), without application registration etc.
Am I right in thinking that this only works if you have support from the authentication service to perform the redirect / provide the token at the end? There’s no way to let the user login via a web browser popup and sniff the responses to grab the token?