Hi Marcus,

On Thu, Apr 9, 2020 at 3:35 AM Christie, Marcus Aaron <[email protected]>
wrote:

> Hi Dinuka,
>
> On Apr 8, 2020, at 3:50 PM, Dinuka Desilva <[email protected]>
> wrote:
>
> I tried this out. And some more questions
>
> 1) http://localhost:8000/auth/login-desktop from this upon successful
> login, it's redirected to
> https://testdrive.airavata.org/auth/login-desktop-success/? with status,
> code, refresh_code, valid_time and username as query parameters. But, a
> custom redirection url cannot be defined. (I couldn't find a way)
>
>
> The setting LOGIN_REDIRECT_URL sets the url to redirect to after logging
> in.
>
Yes. It works and an option given still it requires the desktop application
to have a dedicated server running since the redirect urls are different in
the web application.



> 2) Once above is executed, I ended up with the issue I have mentioned on
> another email thread [1]. I tried three times and it happened right after
> "login-desktop" request.
>
> 3) I tried this on https://testdrive.airavata.org/ also it has no issues.
> But, still I want to get the redirection happen to a custom url that I
> could specify. Could you help me figure out the right settings for that.
>
> 4) From the "login-desktop" requests, I get only the status, code,
> refresh_code, valid_time and username. Using these, how can I obtain the
> access token. Is there an api for that? I found only this
> "refreshed-token-desktop". But, still it returns no tokens in the response.
>
>
> The "code" is the access token.  You can supply refresh_code to
> refresh-token-desktop and the django portal will refresh it and give you an
> access token.
>

I'm not sure how it could be used for django api requests. As in, whether
to pass the "code" as a header etc. An example request call will be helpful.

Reply via email to