Authing DocsDocuments
Concept
workflow
Guides
Development Integration
Application integration
Concept
workflow
Guides
Development Integration
Application integration
Old Version
Development Integration
  • Single Sign-On (SSO)
  • Login component

  • JavaScript/Node.js

  • Java / Kotlin

  • Python

  • C#

  • PHP

  • Go

  • Ruby
  • Android

  • iOS

  • Flutter

  • React Native
  • WeChat Mini Program
  • WeChat webpage authorization
  • Framework Integration
  • Error code
  1. Development Integration
  2. /
  3. Ruby

¶ SDK for Ruby

Update Time: 2025-02-18 09:00:47
Edit

¶ Install

gem install authing

¶ How to use

¶ Initialization

Initialize by token

authing = Authing::Client.new({
  userPoolId: "<Your userPoolId>",
  token: "<Your Token>"
})

Initialize by UserPoolId + Secret

authing = Authing::Client.new({
  userPoolId: "<Your userPoolId>",
  secret: "<Your Token>"
})

Initialize by user login information

authing = Authing::Client.new({userPoolId: "<Your userPoolId>"})
res = authing.register({
  userInfo: {
    email: "c11j@authing.cn",
    password: "username",
    username: "233",
  },
})

¶ Functions

All method names and parameters must be consistent with Graphql.

⚠️ The current version only supports the Authing Graphql interface, and Restful needs additional support.

More interfaces: Authing Graphql (opens new window)

¶ Part of Demo

Login

authing.login({
  email: "authing@tmp.cn",
  password: "authing",
  username: "authing",
})

Register

res = authing.register({
  userInfo: {
    email: "authing@tmp.cn",
    password: "authing",
    username: "authing",
  }
})

Create user roles:

res = authing.createRBACRole({
  input: {
    userPoolId: "5f0c2597061ec4de51237379",
    name: "tmp",
    description: "tmp",
  },
  description: "tmp",
  name: "tmp",
  userPoolId: "5f0c2597061ec4de51237379",
})
Prev: Management role Next: Android
  • Install
  • How to use

User identity management

Integrated third-party login
Mobile phone number flash check (opens new window)
Universal login form component
Custom authentication process

Enterprise internal management

Single Sign On
Multi-factor Authentication
Authority Management

Developers

Development Document
Framework Integration
Blog (opens new window)
GitHub (opens new window)
Community User Center (opens new window)

Company

400 888 2106
sales@authing.cn
16 / F, Block B, NORTH STAR CENTURY CENTER, Beijing(Total)
room 406, 4th floor, zone B, building 1, No. 200, Tianfu Fifth Street, Chengdu(branch)

Beijing ICP No.19051205-1

© Beijing Steamory Technology Co.