1. Is there any way of hiding the social login in Identity Management in the login form in mobile app, but leaving it on the website?
Yes. You can conditionally show or hide parts of your Identity Management login and registration templates based on a stage value, using two template display directives: showIfStage and hideIfStage.
This lets you hide social login options in your mobile app experience while keeping them visible on the website, without maintaining separate templates.
2. How it works
Identity Management templates can evaluate a stage value and then:
-
Show content only for a specific stage with
showIfStage. -
Hide content only for a specific stage with
hideIfStage.
The stage value can be provided via:
-
A URL parameter (for example,
?stage=appor?stage=mobile). -
Your Identity Management initialization (recommended for web to ensure a consistent default — see section 4).
3. Examples
3.1 Hide social login on mobile/app, keep it on web
Wrap your social login section in a container that is hidden for the app stage:
<div hideIfStage="app"> <!-- social login buttons/markup --> </div>
Then ensure that your mobile app opens the Identity Management login or registration experience with the stage set to app — for example, by including stage=app in the URL your app uses to load the form.
3.2 Show social login only on web
If you prefer an allow-list approach, show the social login section only when the stage matches web:
<div showIfStage="web"> <!-- social login buttons/markup --> </div>
4. Recommended: set a default stage on web
If the stage value is not reliably passed in some flows — for example, depending on how a checkout or login flow is started — hideIfStage can be more forgiving than showIfStage, because content is shown by default and only hidden when the stage is explicitly set.
To keep behavior consistent on the website, set a default stage during initialization:
tp.pianoId.init({ stage: 'web' });
This ensures the templates always have a stage value when rendered, preventing unexpected missing elements due to an unset stage.
5. Troubleshooting
|
Symptom |
What to check |
|---|---|
|
Social login is hidden everywhere. |
Confirm your website experience is not being loaded with |
|
Social login still shows in the app. |
Confirm the app is actually passing |
|
Behavior differs between entry points. |
If some entry points set |