eIAM for native mobile apps
eIAM is the central access and authorisation system of the Federal Administration for web applications and native mobile apps.To facilitate the development of native mobile apps (for iOS and Android) and adhere to best practices, a sample app with its source code has been provided, demonstrating how to connect to eIAM via OpenID Connect (OIDC) for both iOS and Android. It is strongly recommended to use these sample apps as a foundation for developing your own apps to ensure smooth integration and support for eIAM.
Check out the short video on this:
- Developing native mobile apps with eIAM. Das im Video erwähnte CH-LOGIN wird durch AGOV abgelöst, das Integrationspattern bleibt unverändert.
Please note that OAuth2 and OIDC flows based on OAuth2 should always be executed in the web browser and not in so-called «embedded web views» within a mobile app. Using «embedded web views» can lead to security risks, functional restrictions and limitations in the user experience.
Example of an OIDC eIAM login into an iOS mobile app
This native app example is an authentication project that demonstrates best practices for integrating OpenID Connect into an iOS app. The app allows users to log in to three eIAM environments (REF/ABN/PROD) and displays token information. A diagnostic screen gives developers direct access to important information and actions.Link:
Source code:
Example of an OIDC eIAM login into an Android mobile app
This native app example is an authentication project that demonstrates best practices for integrating OpenID Connect into an Andriod app. The app allows users to log in to three eIAM environments (REF/ABN/PROD) and displays token information. A diagnostic screen gives developers direct access to important information and actions.Link:
Source code: