Python SDK
Changing password
from scribeauth import ScribeAuth
access = ScribeAuth(client_id)
access.change_password('username', 'password', 'new_password')
Recovering an account in case of forgotten password
from scribeauth import ScribeAuth
access = ScribeAuth(client_id)
access.forgot_password('username', 'password', 'confirmation_code')
Get or generate tokens
With username and password
from scribeauth import ScribeAuth
access = ScribeAuth(client_id)
access.get_tokens(username='username', password='password')
With refresh token
from scribeauth import ScribeAuth
access = ScribeAuth(client_id)
access.get_tokens(refresh_token='refresh_token')
Revoking a refresh token
from scribeauth import ScribeAuth
access = ScribeAuth(client_id)
access.revoke_refresh_token('refresh_token')
Get federated id
from scribeauth import ScribeAuth
pool_access = ScribeAuth(
{
"client_id": client_id,
"user_pool_id": user_pool_id,
"identity_pool_id": federated_pool_id,
}
)
pool_access.get_federated_id(id_token)
Get federated credentials
from scribeauth import ScribeAuth
pool_access = ScribeAuth(
{
"client_id": client_id,
"user_pool_id": user_pool_id,
"identity_pool_id": federated_pool_id,
}
)
pool_access.get_federated_credentials(id, id_token)