-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Loading multiple tracks behind Google auth fails except for one #20
Comments
Thanks for the report. I will try to reproduce this. In the meantime the workaround is to load them serially, or initiate a login before attempting a load. |
Thanks @jrobinso for the quick response. As a workaround, I copy-pasted the |
It will be nice if we could get a |
What would the signature of the sign-in function be? Many sites obtain the oAuth token by independent means, and simply set it using one of the methods here: https://github.com/igvteam/igv.js/wiki/OAuth-Support I agree a signin function would be convenient. |
Thank you! That wiki page is great; but a) I am new to JS and did not know how to write my own function, and b) it did not work for me on first try because of other issues (PRs merged today) so I gave up when I discovered that there is an inbuilt mechanism that activates on the first 401 received (only to come across the issue in this thread). But maybe the best option would be if the wiki said at the end, something like: // For default token retrieval logic.
igv.setGoogleOauthToken(igv.googleSignIn(scope)) // where googleSignIn is a new function.
// For custom token retrieval, provide your access token function, promise or string.
igv.setGoogleOauthToken(accessToken) |
OK I'll give it some thought. You are in new territory, the code you are using was really designed for our web app, its not until now a public thing or part of our supported APIs. But if I can expose it cleanly will do so. I have some other priorities at the moment, just keep this open. |
When loading multiple tracks together using multiple calls to
browser.loadTrack
, I think the retry mechanism in igvxhr.js on a 401 works only for one in-flight promise, all the other in-flight promises will fail. Promises created after a successful signin will work.The text was updated successfully, but these errors were encountered: