mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-23 05:21:15 +00:00
feat(native): buying TREK Cloud in the app asks for the password of the new TREK and opens it signed in
The claim screen takes the password (TREK's policy, checked before anything is bought) and sends it with the purchase; the control plane answers with a one-time welcome code, which the app hands to setServer. iOS and Android open the instance's welcome page with it once after the first page, which signs the buyer in. Without the code (a restore, an older control plane) the app opens the instance as before.
This commit is contained in:
@@ -18,8 +18,11 @@ export interface TrekShellPlugin {
|
||||
* Remembers the server and loads it. The current page is gone afterwards.
|
||||
* `signInHosts` are the hosts of a proxy's sign-in page in front of it
|
||||
* (authGate.ts): only they may load in the web view besides the server.
|
||||
* `welcome` is the one-time code of a TREK Cloud purchase: the first load
|
||||
* opens the server's welcome page with it, which signs the buyer in. A build
|
||||
* without this option ignores it and opens the server as usual.
|
||||
*/
|
||||
setServer(options: { url: string; signInHosts?: string[] }): Promise<void>;
|
||||
setServer(options: { url: string; signInHosts?: string[]; welcome?: string }): Promise<void>;
|
||||
/** Forgets the server and returns to the address screen. */
|
||||
resetServer(): Promise<void>;
|
||||
/** Loads the remembered server again, after it could not be reached. */
|
||||
|
||||
Reference in New Issue
Block a user