Skip to content

Ideas around Authorization saving and population #246

@addshore

Description

@addshore

So, following on from #237 (comment)

This "issue" is rather a place to collect my thoughts and discuss, potentially some of these ideas are bad, but its the combination of thoughts given the xxx confusion I had, + pulling in thoughts from other tooling I have used.


Image

The display of xxx is unclear to me in terms of what it is trying to communicate.
It could be one of these things

  • xxx is the example, a placeholder for you to enter something into
  • It could be representing the fact that a value is there, but we dont want to show you (like *** for passwords)
  • It could be the actual value saved in local storage? waiting for you to update it?

When loading first time and making a request, I actually saw that it made a request with a literal xxx

Image

Not sure if this is something I had entered though?

It was indeed stored in local storage (and the UI didn't really help me figure that out...)

Image

Deleting the key from local storage, and I then correctly see the example appear in the latest version

Image

As a result, im not sure if #237 even was an issue, or rather just I had no idea where the xxx was coming from?

So, I would propose......

1)When key is stored and coming form local storage, keep it editable

Currently when its coming form local storage, it is the placeholder for the field..

Image

This makes it appear exactly like the example, and examples else where and thus is easily confused.

I see other API sandboxes just keep / load the field into the text box and leave it there, so perhaps just do that?

2)Hover text for field saying it is stored between sessions in local storage?

Again, a subtle way to make it easier for folks to understand what it going on?

3)Provide a way to clear from local storage

Perhaps a small clear button next to the APIKey name?

Image

Maybe there should even be a save button here rather than doing it automatically?

Perhaps all of what I have said and am saying should be other in the other component?

Image

4) Provide an optional button next to token field, to take a user to a page to setup the api key?

This could be a custom dedicated page with custom content.
It thus could be as simple as just a page with instructions, and also a text box and save button that would put the key in local storage?
It could also just be a popup?

Perhaps a default component for use on such as page could be used that takes the key and puts it in the right place in local storage?

And perhaps another way of default option that could be provided would be a link to the route page that would generate the token, such as in my case http://localhost:8093/apis/v2/post-users-login
Once making the request and getting a response, next to the response would be a button to say "set as API key" or such?
So this would require some additional options on the route component?

Perhaps something in one of these 3 green places?

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions