Skip to content

Commit

Permalink
core: fix oauth on rehosted urls
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed Feb 25, 2023
1 parent fdccaaa commit 18f5872
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions plugins/core/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion plugins/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@scrypted/core",
"version": "0.1.93",
"version": "0.1.94",
"description": "Scrypted Core plugin. Provides the UI, websocket, and engine.io APIs.",
"author": "Scrypted",
"license": "Apache-2.0",
Expand Down
4 changes: 3 additions & 1 deletion plugins/core/ui/src/interfaces/OauthClient.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ export default {
u = new URL(redirect_uri);
}
catch (e) {
u = new URL(redirect_uri, window.location.href);
const baseURI = new URL(document.baseURI);
const scryptedRootURI = new URL('../../../../', baseURI);
u = new URL('.' + redirect_uri, scryptedRootURI);
u.hostname = 'localhost';
}
if (u.hostname === 'localhost') {
Expand Down

0 comments on commit 18f5872

Please sign in to comment.