logto-rs

Crates.iologto-rs
lib.rslogto-rs
version0.1.0
sourcesrc
created_at2023-12-27 21:15:46.482668
updated_at2023-12-27 21:15:46.482668
description🦀 Logto Rust Unofficial SDKs
homepagehttps://logto.io/
repositoryhttps://github.com/caioluis/logto-rs
max_upload_size
id1081887
size145,644
Caio Gomes (caioluis)

documentation

README


Logto helps you build the sign-in experience and user identity within minutes.

Logto Rust Unofficial SDKs - WORK IN PROGRESS

The repo for SDKs and working samples written in Rust.

Currently there is no integration tutorial, as the project is still a work in progress

Installation

TBD

Packages

Name Description
core Logto SDK core package
utils Helper functions specified at Logto's SDK specs

Resources

Website Docs Discord

Disclaimers

  • This repo is not an official Logto repo, but it would be nice to be so one day.
  • I based my implementation going back-and-forth with Logto's SDKs in Kotlin, JS and Go. You will see that the code has a lot of similarities taken from those 3 codebases.
  • Help is needed and appreciated! This is my first Rust library, so I will be glad to have any feedback and help in organising the code better.
  • The project is not feature complete. Here is an advanced feature tracking system, also called todo list:

SDK Convention

Core

Core functions

  • fetchOidcConfig
  • generateSignInUri
  • generateSignOutUri
  • fetchTokenByAuthorizationCode
  • fetchTokenByRefreshToken
  • revoke

Utility functions

  • generateCodeVerifier
  • generateCodeChallenge
  • generateState
  • decodeIdToken
  • verifyIdToken
  • verifyAndParseCodeFromCallbackUri

Types

  • OidcConfigResponse
  • CodeTokenResponse
  • RefreshTokenResponse
  • IdTokenClaims

Platform SDK

Basic types

  • LogtoConfig
  • AccessToken

LogtoClient

Properties
  • logtoConfig
  • oidcConfig
  • accessTokenMap
  • refreshToken
  • idToken
Methods
  • constructor
  • isAuthenticated
  • SignIn
  • SignOut
  • getAccessToken
  • getIdTokenClaims
Commit count: 47

cargo fmt