The Safe Authenticator acts as a gateway to the Safe Network by enabling users to create an account & authenticate themselves onto the Safe Network. It helps users ensure they have full control over the permissions they grant to Safe apps.
Maintainer: Ravinder Jangra (ravinder.jangra@maidsafe.net)
CI service | Platform | Status |
---|---|---|
Azure DevOps | MacOS |
Safe Authenticator mobile is a cross platform mobile (Android, iOS) application that can be used to create an account and login into the Safe Network. The app also helps the user to authenticate other Safe apps and manage access permissions for the already registered applications.
The app is developed using Xamarin.Forms. Xamarin.Forms is a cross-platform UI toolkit that allows developers to efficiently create native user interface layouts that can be shared across iOS, Android.
The app contains .NET wrapper for safe_authenticator, C# bindings and safe_authenticator
native libraries. safe_authenticator
provides authenticator functions, which include users account registration, login, apps authentication, apps revocation, and communication with apps through the IPC mechanism.
-
Create your account & login to the Safe network:
- Start by providing a secret & password that serves as your digital fingerprint on the Safe Network to create an account.
- Login to the Safe Network
- Auto-reconnect: Turn on auto-reconnect to automatically log into the app when resuming from background mode.
-
Handle Access Requests from Apps: The Safe application authorises through the Authenticator with the required access permissions. The application can create its own container and request access to default containers of the Safe Network i.e. documents, downloads, music, pictures, videos, public and public names, or other application's containers through the authorisation request.
- Auth Request: Allow apps to request default container access & also to create an app's own private container.
- Container Request: Application request access for user's default containers only.
- Shared Mutable Data Request: Request access to mutable data owned by the user.
- Unregistered Access: Allow an app to read public unencrypted content.
-
User Grants Access: When the user approves the request, application specific encryption keys are generated. The application will be identified in the network using its keys. When the user grants or denies authorisation, the application will receive a URI. The user has the option to grant permission to an application to access user data.
-
User can revoke app access: User has the option to revoke access for an app that they have granted access to previously.
-
Select network: User can connect to the different networks using different network connection files from the settings page.
The latest version of the Authenticator app can be downloaded using following links and QR code for Android and iOS devices.
Platform | OS & Architecture | Download Link | QR Code |
---|---|---|---|
Android | 5.0+ (armeabi-v7a, x86_64) | AppCenter, GitHub | ![]() |
iOS | iOS 11+ (ARM64, x64) | AppCenter | ![]() |
Note: We use Azure App Center to distribute iOS builds. Please register here so we can add you in our testing group so you can download and install the app.
- SafeAuthenticator:
- C# API wrapper for the
safe_authenticator
bindings - C# safe_authenticator bindings generated from
sn_client
- Binding utilities and helper functions
- Common UI code and Safe logic for mobile app
- C# API wrapper for the
- SafeAuthenticator.Platform:
- Platform: Android, iOS
- Contains native libraries for the platform
- C#
safe_authenticator
platform bindings - Platform specific/dependent code
- Custom controls for native UI
- Platform assets
- Platform dependent service code
- Tests:
- Contains shared unit test project for Safe Authenticator API.
- Platform specific projects containing setup required to run shared tests on Android and iOS.
The package uses native code written in Rust and compiled into the platform specific code. Learn more about the sn_client
in the Safe Network client libraries wiki.
Instructions to update the safe_authnenticator
bindings in the Safe Authenticator App:
- Generate bindings for
safe_authenticator
. - Update
AuthTypes
,BindingUtils
andIAuthBindings
file inSafeAuthenticator
project. - Update binding classes
AuthBindings.cs
andAuthBindings.Manual.cs
in platform specific code with newly generated bindings.
Note: Please make sure the changes made in the manual files in Safe Authenticator are synced with sn_client and vice versa.
Platform invoke is a service that enables managed code to call unmanaged functions that are implemented in dynamic link libraries or native libraries. It locates and invokes an exported function and marshals its arguments (integers, strings, arrays, structures, and so on) across the interoperation boundary as needed. Check links in useful resources section to know more about how P/Invoke works in different .NET environments and platforms.
We use shared unit tests for safe_authenticator
API which can be run on Android and iOS platforms.
- Visual Studio 2017 or later editions:
- Cake - Cross-platform build script tool used to build the projects and run the tests.
- Using High-Performance C++ Libraries in Cross-Platform Xamarin.Forms Applications
- Native interoperability
- Interop with Native Libraries
- Using Native Libraries in Xamarin.Android
- Referencing Native Libraries in Xamarin.iOS
Get your developer related questions clarified on Safe Dev Forum. If you're looking to share any ideas or thoughts on the Safe Network you can reach out on Safe Network Forum
This Safe Network library is dual-licensed under the Modified BSD (LICENSE-BSD https://opensource.org/licenses/BSD-3-Clause) or the MIT license (LICENSE-MIT https://opensource.org/licenses/MIT) at your option.
Want to contribute? Great 🎉
There are many ways to give back to the project, whether it be writing new code, fixing bugs, or just reporting errors. All forms of contributions are encouraged!
For instructions on how to contribute, see our Guide to contributing.