Goal
Give logged-in users a way to end their session right from inside the app. You’ll add a Logout button, place it on a screen or in the menu, and pair it with your Login button — so anonymous users see Login, and signed-in users see Logout.
The Logout button is one of the simplest content types in MAM Suite — it has no settings to fill in. Most of this recipe is about where to put it and confirming it shows up for the right people.
Prerequisites
- Admin access to Mobile App Manager.
- A working Login button somewhere in the app. Logout only makes sense alongside Login — see Content class: Login button if you haven’t set one up yet.
- A user account you can sign in with in the Previewer, so you can confirm the button appears (and disappears) correctly.
What the Logout button does
When a signed-in user taps Logout, the app clears its session state and ends their session right there. The button itself is a thin shell with no per-button configuration — when you add it, MAM Suite shows “No settings required” instead of a settings form.
Two behaviors are worth knowing before you place it:
- It only renders for authenticated users. The app simply never sends the Logout button to anyone who isn’t signed in. That’s why you pair it with a Login button on the same screen: anonymous viewers see Login, signed-in users see Logout, and you never have to build that toggle logic yourself.
- It does not unregister the device from push notifications. Logging out ends the session, but the device’s push token stays put — so the user keeps getting notifications tied to their account. That’s intentional. Fully detaching a device is a separate operation; see Content class: Logout button for the details.
Steps
1. Open the Buttons admin
Go to Mobile App Manager → Buttons — this lists every button configured for the currently selected role. The dropdown at the top switches roles, and since buttons can have per-role variants, make sure you’re on the role whose users should be able to log out.
2. Add a Logout button
Click Add a Button. In the content-type dropdown, choose Logout Button, and enter a display title (for example, “Log Out” or “Sign Out”).
The button saves right away into the role’s button array. Open it and you’ll see “No settings required” — there’s nothing further to configure on the button itself.
3. Place the button where users will find it
Adding a button doesn’t put it anywhere on its own — you still have to reference it from a screen, the left menu, or the tab bar. Most people place Logout in the left (hamburger) menu, right next to Login:
- Left menu: Mobile App Manager → Navigation → Left Menu — drag the Logout button into the menu, typically alongside Login.
- Home screen: Mobile App Manager → Layout — drag it into a layout section.
- Tab bar: Mobile App Manager → Navigation → Tab Bar — pick it as one of the tabs (less common for Logout).
Since Login hides itself once someone’s signed in, and Logout hides itself until they are, dropping both into the same menu spot gives you an automatic Login/Logout toggle — no extra logic required.
4. (Optional) Restrict to the right roles
Only want certain roles to be able to log out from the app? Use the role dropdown at the top of the Buttons page and add the Logout button just for those roles. The app enforces this separation when it fetches its buttons, so a role without the button simply won’t see it.
5. Verify in the Previewer
Now see it live: open the Previewer, switch to the role you set up, then:
- While signed out, head to the screen or menu where you placed the buttons — you should see Login and not Logout.
- Sign in with a test account. Login should disappear and Logout should take its place.
- Tap Logout. The app should end your session and drop you back to the signed-out state, with Login visible again.
If the Logout button never shows up, double-check you’re testing while signed in — it’s hidden for anonymous users by design. Still missing even when signed in? Check that it was added for the role you’re previewing and that its Show Button toggle is on.
Verification
- The Logout button appears in Mobile App Manager → Buttons for the intended role.
- The button is selectable in the layout / left-menu / tab-bar admin where you placed it.
- In the Previewer, a signed-out user sees Login; a signed-in user sees Logout.
- Tapping Logout ends the session and returns the app to the signed-out state.
Related
- Content class: Logout button — the reference page, including the push-token note and the actions fired during logout.
- Content class: Login button — the other half of the Login/Logout pair.
- Recipe: Add a button — the general button workflow this recipe is based on.
What’s next
Now that Login and Logout are both in place, it’s worth looking at what a signed-in user can reach that an anonymous user can’t — for example, gating screens behind login or requiring login at app launch. See Content class: Login button for the require_login setting and related auth options.
