This is possible out of the box in OH 3 by setting the default card widget. See OH 3 Examples: How to boot strap the state of an Item
I don’t think this is necessary. I think you can use a plain old html file with some simple JavaScript and a form to achieve the same result and then eliminate the dependency on an external server. See OAuth2 using just OH Rules and myopenhab.org for a partial example.