threebot
Version, currently master branch1 version
- master branchlatestJul 19, 2020
github.com/Hamdy/kemal-threebot-oauth
Kemal framework - Threebot login support (Oauth)
0 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
threebot:
github: Hamdy/kemal-threebot-oauth
branch: mastermaster is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
0.35.1- License
- MIT
- Author
- your-name-here <your-email-here>
Dependencies
Runtime Dependencies
- kemal*git: https://github.com/kemalcr/kemal.git, commit: a8c0f09b858162bd13c96663febef5527b322a32
- sodium*git: git@github.com:didactic-drunk/sodium.cr.git, commit: c99862505620a3ec135bbe12a2ff63f3c0def3e4
- spec-kemal*github: kemalcr/spec-kemal
- kemal-session-bcdb*github: hamdy/kemal-session-bcdb
README
threebot
Threebot login module for kemalcr.com applications and for crystal lang in general
Installation
-
Add the dependency to your
shard.yml:dependencies: threebot: github: crystaluniverse/kemal-threebot -
Run
shards install
How to use
Download, compile & run 0-db (Backend for BCDB)
git clone git@github.com:threefoldtech/0-db.gitcd 0-db && make./zdb --mode seq
Download, compile & run BCDB (Backend for BCDB)
- Install Rust programming language
git clone git@github.com:threefoldtech/bcdb.gitcd bcdb && make- copy bcdb binary anywhere
cp bcdb/target/x86_64-unknown-linux-musl/release/bcdb . - download
tfuserutility from here - use
tfuserto register your 3bot user to explorer and generate seed fileusr.seedusing./tfuser id create --name {3bot_username.3bot} --email {email} - run bcdb :
./bcdb --seed-file user.seed - now you can talk to
bcdbthrough http via unix socket/tmp/bcdb.sock
Export needed environment vars
export SEED="sY4dAEWZXsPQEMOHzP65hNeDr4+7D0D6fbEm2In22t0="
export OPEN_KYC_URL=https://openkyc.live/verification/verify-sei
export THREEBOT_LOGIN_URL=https://login.threefold.me
Usage (Kemal.rc example)
require "kemal-session"
require "kemal-session-bcdb"
require "kemal"
require "threebot"
include Threebot
def login(context, email, identifier)
pp! email
pp! identifier
end
notes
- You must include
Threebotmodule - You must provide
def login(context, email, identifier)method with your login logic, including any redirection after successful login
Require and add session settings if not included
require "kemal"
require "kemal-session"
require "kemal-session-bcdb"
Kemal::Session.config do |config|
config.cookie_name = "redis_test"
config.secret = "a_secret"
config.engine = Kemal::Session::BcdbEngine.new(unixsocket= "/tmp/bcdb.sock", namespace = "kemal_sessions", key_prefix = "kemal:session:")
config.timeout = Time::Span.new hours: 200, minutes: 0, seconds: 0
end
URL to use for 3botligin
- URL to redirect to 3bot login
{domain}/threebot/login
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
master- Seen
- Jul 19, 2020
- Crystal
0.35.1- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/Hamdy/kemal-threebot-oauth
Metadata
- Created
- Aug 12, 2026
- Updated
- Nov 7, 2026
- Synced
- Nov 7, 2026
- Versions
- 1