Skip to content
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

Allow for a post request to setup configuration #846

Closed
ajmas opened this issue Jul 8, 2023 · 2 comments
Closed

Allow for a post request to setup configuration #846

ajmas opened this issue Jul 8, 2023 · 2 comments
Labels

Comments

@ajmas
Copy link

ajmas commented Jul 8, 2023

We have a server where we host a scaled down web client, allowing for the basic registration and listing of short links. For more advanced usage, we would like to provide an option to link either to the shared app.shlink.io instance or equivalent.

The issue right now, for the app.shlink.io site is that I can't share a link to the UI, as the configuration is in localstorage.

The solution I am thinking of is to have our UI link to the app.shlink.io site, with a POST payload, containing the following:

{
  "name": "",
  "url": "",
  "key": ""
}

This would then automatically open the UI with the right configuration and optionally over-ride the configuration, if there is already one with the same name.

Maybe we could have the https://app.shlink.io/server/create page support parameters for this, with a 'force' option?

Right now I am looking at thesrc/servers/CreateServer.tsx component to see changes that could be made, but realise I need to refresh my React skills first.

@ajmas ajmas added the feature label Jul 8, 2023
@ajmas
Copy link
Author

ajmas commented Jul 8, 2023

Exploring a bit more, since we are dealing with a purely frontend application, the POST approach would likely not work, so would need to think of another approach.

The only other approach I can think of right now feels a little convoluted right now, but would follow something like the oauth/openid approach:

  • Requesting service gets a temporary key, which lasts about 30 seconds (probably shorter)
  • GET https://app.shlink.io/server/create?server=xyz&tmpkey=2342&name=hellow
  • Webclient requests a longer duration key using tmpkey
  • Configuration stored in localstorage using the returned key

@acelaya
Copy link
Member

acelaya commented Feb 2, 2024

This app will not include more complex mechanisms and workarounds to create servers.

For more advanced stuff, Shlink Dashboard will be implemented soon.

@acelaya acelaya closed this as not planned Won't fix, can't repro, duplicate, stale Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants