Skip to content

A Python implementation of the Azuriom Auth API.

License

Notifications You must be signed in to change notification settings

AktiCube/AzAuthPY

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AzAuthPY

A Python implementation of the Azuriom Auth API.

Installation

pip install git+https://github.com/AktiCube/AzAuthPY.git

Uninstallation

pip uninstall azauthpy

Usage

from azauthpy import AzAuth, LoginState, User

def login(email: str, password: str) -> User:
    client = AzAuth('https://www.akticube.fr')

    result = client.login(email, password)

    if result.status == LoginState.NEEDS_SECURE_CODE:
        code = input('Please enter your 2FA Code: ')
        result = client.login(email, password, code)

    if result.status == LoginState.SUCCESS:
        print(f"Welcome {result.user.username}!")
        return result.user
    elif result.status == LoginState.USER_BANNED:
        print('You are banned!')
        return None
    else:
        print("Login failed!")
        return None

About

A Python implementation of the Azuriom Auth API.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages