# Заблокирован в аккаунте администратора после отключения SSO Memberful

**URL:** <https://meta.discourse.org/t/locked-out-of-admin-account-after-disabling-sso-memberful/156976>\
**Category:** Product Support\
**Created:** [07.Июль.2020 00:12:56 UTC](https://meta.discourse.org/t/locked-out-of-admin-account-after-disabling-sso-memberful/156976 "2020-07-07T00:12:56Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![osioke](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/osioke/32/238946_2.png) [@osioke](https://meta.discourse.org/u/osioke)\
**Post date:** [07.Июль.2020 08:50:50 UTC](https://meta.discourse.org/t/locked-out-of-admin-account-after-disabling-sso-memberful/156976/2 "2020-07-07T08:50:50Z")

</div>

Генерация API-ключа выглядит примерно так:

```plaintext
    user = ...
    api_key = ApiKey.new
    api_key.created_by = user
    api_key.user = user
    api_key.save!

```

А затем вы можете получить ключ с помощью `api_key.key`

---

_[View the full topic](https://meta.discourse.org/t/locked-out-of-admin-account-after-disabling-sso-memberful/156976)._
