Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rodnt/mtls-flutter
This repo contains a simple flutter app to test MTLS
https://github.com/rodnt/mtls-flutter
Last synced: 5 days ago
JSON representation
This repo contains a simple flutter app to test MTLS
- Host: GitHub
- URL: https://github.com/rodnt/mtls-flutter
- Owner: rodnt
- License: apache-2.0
- Created: 2024-04-19T21:36:48.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-04-19T21:50:08.000Z (9 months ago)
- Last Synced: 2024-04-19T22:32:28.874Z (9 months ago)
- Language: Dart
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mtls_example_flutter
A simple example for how to use private key and certificate in you flutter app with a server example https://github.com/rodnt/flask-mtls#### Install
1. Download flutter enviroment: https://flutter-ko.dev/get-started/install
2. Configure the mtls server at https://github.com/rodnt/flask-mtls#### Usage
1. Copy ca.crt,certificate.crt and private.key generated from flask-mtls to anyplace that you want.
2. Add to EXPORT env at terminal (iterm2, Terminator.. etc..)```bash
# b 0 from macOS and w 0 from linux
export PRIVATE_KEY_BASE64="$(base64 -b 0 assets/keys/private.key)"; export CERTIFICATE_BASE64="$(base64 -b 0 assets/keys/certificate.crt)"
```3. Inside the project run the following command
```bash
flutter run --release --dart-define=PRIVATE_KEY_BASE64=$PRIVATE_KEY_BASE64 --dart-define=CERTIFICATE_BASE64=$CERTIFICATE_BASE64
```4. Test the app :)
5. You can get the APK at `mtls_example_flutter/build/app/outputs/flutter-apk/`