You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my application, I automatically detect expired JWT access tokens and redirect to /refresh_token?redirect=..., where the redirect parameter is the page the user just tried to access. I wrote this function to generate the redirect URL:
exportfunctionpageUrl(page){leturl=`http://${page.host}${page.path}`;if(page.query.values().next().done){// no query paramsreturnurl;}else{returnurl+'?'+page.query.toString();}}
Unfortunately the URL scheme has to be hardcoded here, because it isn't available on page. It would be nice to include it -- is there some reason that wouldn't be practical?
The text was updated successfully, but these errors were encountered:
kamholz
changed the title
url scheme should be made available
url scheme should be made available on pageApr 23, 2021
kamholz
changed the title
url scheme should be made available on page
url scheme should be made available on page object
Apr 23, 2021
We don't have access to this on the server, because even if the site is, say, running with the Node adapter and is being served over HTTPS, that's handled by a proxy living in front of the SvelteKit app, which is always serving HTTP.
In my application, I automatically detect expired JWT access tokens and redirect to
/refresh_token?redirect=...
, where the redirect parameter is the page the user just tried to access. I wrote this function to generate the redirect URL:Unfortunately the URL scheme has to be hardcoded here, because it isn't available on
page
. It would be nice to include it -- is there some reason that wouldn't be practical?The text was updated successfully, but these errors were encountered: