Cookie-based login

Turn your website into an app in 60 seconds!
Preview My App
Jack & Jones' desktop website and mobile app.

The cookie-based login method is the easiest approach for enabling login on your Canvas app.

On most websites, when a user goes through the authentication process, a cookie is generated and stored on the browser. That cookie holds a token, which is then used by the website to revalidate the user login without having to ask for the username and password to be provided again.

Canvas allows you to use that cookie to determine if the user is logged in or not.

⚠️ IMPORTANT! Canvas doesn't authenticate or validate the user login, it simply uses the cookie to determine if the user is logged in or not, dismissing the login screen if necessary.

On every request performed by the app, a check with be performed against the cookies on the page being requested, if the selected cookie name is present, the user will be considered logged in.

To enable the cookie-based login the first step is to set the "login_method" parameter in your Canvas configuration to "cookie_name". The “cookie_name” parameter must be added inside the “Login” options, as you can see below:

Notion Image

You will now need to set up the "Cookie_Name_Regex" parameter with your cookie name. This is a regex field, meaning that the app will look for a cookie name that matches the rules defined in this field.

Notion Image

If your cookie name is "logged_in" you can use "logged_in" as the value. If your cookie name uses random strings, like "logged_in_123456" where the number is always different for each user, you can use "user_logged_in_.*" as the value.

Defining the cookie name when you are the website developer is easy, but if you need assistance with identifying the name of your login cookie, see our guide on how to find your login cookie name.

Now that you have configured your cookie-based login in the app, you will want to make sure everything works as expected.

Whenever the app identifies a successful login, it will display your app splash screen, with a message at the top ("Logged-in successfully, redirecting..."), for a very brief period and then will take the user to the content. If you are not seeing the splash screen after the login you might want to review your regex and app configuration to make sure everything has been properly configured.

Launch your brand's mobile app with a team of experts by your side.

Our team holds your hand through every step of the process to make building an app a no-brainer.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
  • Preview your app yourself or get a live demo on a call.
  • Learn about our platform and process to help you launch with minimal work required.
  • Risk free - 100% app approval guaranteed or your money back.
Only and Bestseller's iOS and Android apps.
Thank you! We'll be in touch within 48 hours :)
Oops! Something went wrong while submitting the form.
Chat icon.