cedadev / online_ca_client

1 stars 1 forks source link

get_token needs alternative for when no local browser available #15

Open mjpritchard opened 2 years ago

mjpritchard commented 2 years ago

Could model this on how Globus do their consent gathering, i.e. present a URL for users to copy & paste into a non-local browser, and enter the resulting auth code. Example from globusconnectpersonal linux setup:

Detected that setup has not run yet, and '-setup' was not used
Will now attempt to run
  globusconnectpersonal -setup

Globus Connect Personal needs you to log in to continue the setup process.

We will display a login URL. Copy it into any browser and log in to get a
single-use code. Return to this command with the code to continue setup.

Login here:
-----
https://auth.globus.org/v2/oauth2/authorize?client_id=4abcd8ae-8ca0-40e4-aaa9-8ec8e8320621&redirect_uri=https%3A%2F%2Fauth.globus.org%2Fv2%2Fweb%2Fauth-code&scope=openid+profile+urn%3Aglobus%3Aauth%3Ascope%3Aauth.globus.org%3Aview_identity_set+urn%3Aglobus%3Aauth%3Ascope%3Atransfer.api.globus.org%3Agcp_install&state=_default&response_type=code&code_challenge=wQuGJhrNoSTNJhEF5hcVxtFhkD75Pdj52Zxd406M0vU&code_challenge_method=S256&access_type=online&prefill_named_grant=blah
-----
Enter the auth code: