Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
201 changes: 0 additions & 201 deletions LICENSE

This file was deleted.

42 changes: 20 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,35 @@

## Introduction

Threefold Connect is a mobile app that serves as your main gateway to the Threefold Grid and various other Threefold products and services.
Threefold Connect is a mobile app that serves as your main gateway to the Threefold Grid and various other Threefold products and services.

It contains an ultra secure 2FA authenticator for authenticating through third party applications.

Inside the app, you can manage your Threefold Tokens(TFT).

## Features

#### Threefold news
### Threefold news

Inside the app, there is a "News" section where you can find all the latest Threefold news!

#### Wallet
### Wallet

In the Threefold Connect app, it is possible to manage your TFT and view your transaction history on the TF chain.

#### Farmers
### Farmers

If you own a Threefold node, you can manage your farm here.

#### Support
### Support

If you have Threefold related questions, we provide a support chat where we will answer your questions as soon as possible!

#### Planetary network
### Planetary network

It is possible to have a a planetary network IPv6 address. Here you can enable the planety network connection and your phone will automatically be connected to the p2p network.
It is possible to have a a planetary network IPv6 address. Here you can enable the planetary network connection and your phone will automatically be connected to the p2p network.

#### Identity
### Identity

When you are using the secure 2FA authentication, some third party apps require certain information (eg. phone number). In this tab you can verify your email, phone number and identity to provide this data to the third party application. This allows you total granular control over which data you choose to share or not share.

Expand All @@ -42,43 +42,41 @@ In June 2022, a new codebase has been written for this project. It is built on t

### External repositories

Threefold News: https://github.com/threefoldtech/threefold_connect_news
Threefold News: <https://github.com/threefoldtech/threefold_connect_news>

Wallet v3: https://github.com/threefoldtech/wallet-next
Wallet v3: <https://github.com/threefoldtech/wallet-next>

Farmer: https://github.com/threefoldtech/wallet-next
Farmer: <https://github.com/threefoldtech/wallet-next>

Support: https://github.com/threefoldtech/tfsupport
Support: <https://github.com/threefoldtech/tfsupport>

## Frontend

Make sure the correct configuration is inside config.js. After that start the frontend by doing:

`yarn && yarn serve`


## Backend

Go inside virtual environement:
Go inside virtual environment:

`source ./venv/bin/activate
`
`source ./venv/bin/activate`

Start UWSGI backend:

` uwsgi --http :5000 --gevent 1000 --http-websockets --master --wsgi-file __main__.py --callable app -s 0.0.0.0:3030
: 1643024584:0;uwsgi --http :5000 --gevent 1000 --http-websockets --master --wsgi-file __main__.py --callable app -s 0.0.0.0:3030`

```bash
uwsgi --http :5000 --gevent 1000 --http-websockets --master --wsgi-file __main__.py --callable app -s 0.0.0.0:3030
: 1643024584:0;uwsgi --http :5000 --gevent 1000 --http-websockets --master --wsgi-file __main__.py --callable app -s 0.0.0.0:3030
```

## App

Make sure you have at least Flutter 2.8.1 installed. If everything is installed properly, execute the following commands:
Make sure you have at least Flutter 2.8.1 installed. If everything is installed properly, execute the following commands:

Copy the file in /lib/app_config_local.template into /lib/app_config_local.dart and change the configuration to your local IP's

After that, use the build.sh script to set up the right environement
After that, use the build.sh script to set up the right environment

`./build.sh --init && ./build.sh --switch --local`

Connect your phone / start an emulator and everything should work properly.

45 changes: 23 additions & 22 deletions app/2fa_login_examples.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,43 @@
## Code examples
# Code examples

### How to integrate 3Bot Connect app as decentralized login mechanism
## How to integrate 3Bot Connect app as decentralized login mechanism

#### Python
### Python

https://github.com/threefoldtech/Threefold-Circles/blob/production/taiga/threebot/api.py#L42
<https://github.com/threefoldtech/Threefold-Circles/blob/production/taiga/threebot/api.py#L42>

#### php
### php

https://github.com/freeflowpages/freeflow-threebot-login/blob/master/authclient/ThreebotAuth.php#L26
<https://github.com/freeflowpages/freeflow-threebot-login/blob/master/authclient/ThreebotAuth.php#L26>

https://github.com/freeflowpages/freeflow-threebot-login/blob/master/controllers/user/UserController.php#L43
<https://github.com/freeflowpages/freeflow-threebot-login/blob/master/controllers/user/UserController.php#L43>

#### Crystal lang
### Crystal lang

https://github.com/crystaluniverse/kemal-threebot
<https://github.com/crystaluniverse/kemal-threebot>

#### Go
### Go

See lines 137-179 as well as SignIn and VerifyCallback function in :
https://github.com/threefoldtech/tf-gitea/blob/b63f8429483290e96fadbc7a9ca0bf9ff9c1232a/routers/user/auth.go
See lines 137-179 as well as SignIn and VerifyCallback function in :
<https://github.com/threefoldtech/tf-gitea/blob/b63f8429483290e96fadbc7a9ca0bf9ff9c1232a/routers/user/auth.go>

#### Python extra tooling
### Python extra tooling

##### Proxy for Redirection
#### Proxy for Redirection

A proxy written in python where u can talk to, using any language using http client.
It can help you for url redirection for 3bot connect. You can define the call back in your application at any point, then get then same parameters sent by 3bot connect to your endpoint to this proxy to decrypt data for you.
So you can verify whether the user has logged in, get his 3Bot name, e-mail etc.
A proxy written in python where u can talk to, using any language using http client.
It can help you for url redirection for 3bot connect. You can define the call back in your application at any point, then get then same parameters sent by 3bot connect to your endpoint to this proxy to decrypt data for you.
So you can verify whether the user has logged in, get his 3Bot name, e-mail etc.

https://github.com/threefoldtech/threefold-forums/tree/master/3bot
<https://github.com/threefoldtech/threefold-forums/tree/master/3bot>

##### Library
#### Library

pyncal

Keys can be generated using
`
Keys can be generated using

```bash
import nacl.signing
nacl.signing.SigningKey.generate().encode(nacl.encoding.Base64Encoder)
`
```
23 changes: 23 additions & 0 deletions app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,26 @@ A few resources to get you started if this is your first Flutter project:
For help getting started with Flutter, view our
[online documentation](https://flutter.dev/docs), which offers tutorials,
samples, guidance on mobile development, and a full API reference.

## How to run the app on Android

1. Connect your android device (make sure you have a new android version)
2. Choose your environment `testing|staging|production`
3. Run `./build.sh --run --testing|staging|production`

### Local run

1. Run [backend](../backend/README.md#run-in-dev-mode)
2. Run [frontend](../frontend/README.md#3botlogin-frontend)
3. Run [pkid](https://github.com/threefoldtech/pkid#run-in-dev-mode)
4. Run [openkyc](https://github.com/threefoldtech/threefold_connect_openkyc/blob/master/readme.md.old#L83)
5. Copy the file in `app_config_local.template` into `app_config_local.dart` and change the configuration to your local IP's
6. Run the app using `./build.sh --run --local`

## Known issues

- <https://github.com/threefoldtech/threefold_connect/issues/306>

## TODO

- signingConfigs
Loading