girder / girder_web_components

Reusable Javascript and VueJS components for interacting with a Girder server.
https://gwc.girder.org
Apache License 2.0
16 stars 9 forks source link

Token from oAuth reply #149

Closed subdavis closed 5 years ago

subdavis commented 5 years ago

Nothing too special here. Worth noting that I think it's sufficient to do a rewrite on the location.hash of the page after getting the token from there. This library isn't in control of page location, so there may be virtual hash routes from a vue router we don't want to change.

Here's a complex example:

// before redirect
http://origin.com/path?query#/virtual/path#girderToken={girderToken}__
// after first redirect @ girder, girder fills the template string.  It may also append whatever other noise it wants -- that's the reason for the suffix.
redirect_to = http://origin.com/path?query#/virtual/path#girderToken=tokenstring__#other/stuff?
// after GWC has loaded, location should look like this:
http://origin.com/path?query#/virtual/path#other/stuff?

fixes #73