Generate experiences with Puck AI
Read docs
CloudAPI referencecloud-clientHelpersloginUrl

loginUrl

Puck Auth is experimental and may change in a future release.

Get a URL to sign in to Puck Auth.

import { loginUrl } from "@puckeditor/cloud-client";
 
loginUrl("/puck");
// "/api/puck/auth/login?returnTo=%2Fpuck"

Returns a URL to redirect the user to.

Args

ParamExampleTypeStatus
returnTo"/puck"String-

returnTo

The path in your app to send the user to after they sign in, for example /puck. Must be on the same origin. Defaults to /.