Support for Password in URL #147
richashford
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
One additional change to the above that was needed (so the page can be refreshed/bookmarked) is below: Replace the line: With: In the function obs.on('Identified', async () of src/App.svelte |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Thanks for an awesome obs tool - it really works well. I needed to provide a simple one-click URL to log users into OBS - so I made the following modifications to my version:
Changes to src/App.svelte
From Line 66:
if (document.location.hash !== '') {
// Read address from hash
// address = document.location.hash.slice(1)
// Read address and password (if supplied) after hash on URL
params = document.location.hash.slice(1)
// Address and password separated by & on URL e.g. ws://localhost:4455&password
const parameters = params.split("&")
address = parameters[0]
password = parameters[1]
await connect()
}
Added after Line 91:
let params
This change allows the URL to be in the format:
http://obs_web_server/#ws://obs_server:4455&password
So the password can be added after the obs_server address and port separated by &
I appreciate that passing the password in the URL (especially on a non-SSL URL) present a security risk - so it might be something you have chosen to avoid - but for my scenario, this is an acceptable risk
Beta Was this translation helpful? Give feedback.
All reactions