Skip to content

Creating and getting preauth key #14

Closed

Description

@yerartdev

Describe the bug
Maybe this is not an issue. I know Headscale CreatePreAuthKey does return the full key in the response. When I create a new PreAuth key with scale manager and after the green banner all has been ok, I thought somehow I may be able to copy the new key to use it to enrol a new device. Well, I cannot. It’s the hashed version of the trailing asterisks.

Expected behavior
I would naively expect just after the successful creation a once chance to copy the full key.

Smartphone);

  • Device: iPhone SE 2022
  • OS: iOS26
  • ScaleManager
  • Version 1.27

Activity

  1. added
    bug
    on Oct 10, 2026
  2. gm852 commented on Oct 10, 2026

    @gm852
    Contributor

    thanks for this issue, will take a look and address this in the next release as soon as possible.

  3. gm852 commented on Oct 10, 2026

    @gm852
    Contributor

    @yerartdev after looking into it, im not seeing this issue as you can go under the user that you made the pre auth key for and copy it from there. If this is more of a UI/UX issue where on creation you should have the option to see and copy it i can see that for people with many users and many past pre auth keys made.

    Please follow up and let me know if this is something where you full on cannot copy the value at all or if its more of just a confusing UI thing so i can get a fix out for you, thanks!

  4. yerartdev commented on Oct 13, 2026

    @yerartdev
    Author

    Thanks for your replay @gm852 . Perhaps the UI misleads me somehow. I don’t have a pre—Auth key or user volume issue. You say you can go under the user and copy it. Well, I see that you can tap on the Auth key icon in the underbar and display a list of users with an account of active and total user keys. You can also unfold the list of keys for that user. The thing is that all the keys are listed as hashes (kind of) like this: hskey-auth-BDKWBiUfEruf-*** (including the trailing asterisks). If you tap to copy, what you get is the same string with the trailing asterisks and not the full key you need to make an enrolling log in of a device of the user. That is the thing that I’m pointing out. What am I missing / not understanding here?

  5. gm852 commented on Oct 14, 2026

    @gm852
    Contributor

    After doing some digging and testing I've identified the issue your referring to, on versions of Headscale 0.28+ the full pre auth key is only returned on creation. The current method in app was to just get all pre auth keys, meaning the pre auth keys for versions 0.28+ came from the admin API already truncated. I've applied a fix on branch #15 so that it shows you the key and allows you to copy it before continuing when creating a pre auth key.

    The fix has been pushed and tested by internal testers, once everything checks out Scale Manager v1.2.8 will be released as soon as possible. My estimate for iOS release is next week around 10/19/26 or sooner (depending on apple reviewer speeds) and the .apk will be available via releases as soon as the release is made. Thank you for opening a issue to make the app better and keep a eye out for the update! (:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions