Skip to Content
This project is in active development. Features and behaviors may change without notice.

generationAuthPageUrl

Type: generationAuthPageUrl(title?: string): APIResult<string>

generationAuthPageUrl() is an instance method that generates a redirect URL for Scratch authentication.
You can optionally specify a display title for the application.

TypeScript
const = .(); const = .("MyApp"); if (.) { .. = .; // Redirect to authentication page }

Parameters

OptionTypeDescription
titlestringDisplay name of the application

Return Value

  • APIResult<string>: A response containing the URL for the authentication page.

Success example:

{ "code": "SUCCESS", "success": true, "data": "https://auth.itinerary.eu.org/auth/?redirect=..." }

Failure example:

{ "code": "ERROR/GENERATION", "success": false, "status": 500, "message": "An unexpected error occurred while generating the authentication page URL.", "error": {} }

Notes

  • The generated URL includes the redirect_url specified in init().
  • If the redirect destination is not correctly set, the user cannot return after authentication.
  • Since btoa() may not support UTF-8, use only standard ASCII strings for the title.
Last updated on