Organizations and roles
How a onefold organization lets several developers own and manage applications together, how roles and permissions decide what each member may do, and what an organization does not do.
An organization is a group of developers who own and manage applications together. It decides who may administer an application. It has nothing to do with your end users.
What an organization is
- An organization has exactly one owner and any number of members.
- Every application belongs to exactly one organization, and the organization's plan sets how many it may own.
- Every member reaches the applications the organization owns, as far as their roles allow.
You manage organizations under Organizations in the developer portal.
What an organization is not
Organizations do not separate end users
onefold has one pool of accounts. An organization does not have its own users, does not restrict who can sign in to its applications, and is not a tenant. A person who authorizes two applications owned by two different organizations uses the same account for both.
An organization also gives your end users no roles. Roles here are for the developers who manage applications. Permissions inside your product are yours to build.
Creating an application
You create an application inside an organization, and choose which one when you register it. You need the Create applications permission in that organization. The owner holds it, and so does the Admin role. If you have no organization to create in, onefold makes you an ordinary one named Personal Organization, which you manage like any other.
An application stays in the organization that created it, with its client ID, secret, redirect URIs and every user's grant, until its owner moves it to another organization. Deleting one is reserved for the organization's owner.
An organization that has reached its plan's application limit refuses only a new application. The applications it already owns are never removed.
Members and invitations
Invite a person by email address from the organization's Access tab, choosing the roles they will hold. The invitation becomes a membership when they accept it. A pending invitation counts toward the organization's seats.
An invitation link works once. It is shown only when you create the invitation. Resending an invitation issues a new link, and the old one stops working. The person must accept it with an account whose email address matches the one you invited. An invitation is refused when the member who sent it does not hold the right to send it at the moment it is accepted, and while the organization is suspended.
A member can leave, and a member with the right permission can remove another.
Roles
A role is a named set of permissions inside one organization. A member can hold several.
For each permission, a role says one of three things:
| State | Meaning |
|---|---|
| Allow | The role grants the permission |
| Deny | The role withholds it, even when a lower role grants it |
| Inherit | The role says nothing. Whatever the member's other roles decide stands. |
Roles are ordered. When two of a member's roles disagree about a permission, the one higher in the list decides. Reordering roles therefore changes access.
Every organization has an everyone role at the bottom of the list. Every member holds it, and it cannot be removed or moved. It is where you set what any member may do.
Three rules stop a member from raising their own authority:
- A member can change only roles below their own highest role.
- A member can never grant a permission they do not hold. Assigning a role and inviting someone with one both need you to hold everything the role grants.
- Nobody changes their own roles.
Per-application access
A role applies to every application the organization owns. To make an exception, give the role an override for one application: the same three states, applied to that application only. Use it for a contractor who should see one application and not the others.
Permissions
Permissions are named after the portal tab they govern. Where a tab can be read and changed,
it has a pair: view, and edit for configuration or manage for a credential.
| Area | Permissions |
|---|---|
| The organization | View the overview, edit settings, view analytics, view applications, view activity |
| Members and roles | View members, invite, remove, assign roles; view roles, create and edit roles |
| An application | View, create, edit; view and manage OAuth2 settings, run the test flow |
| Sign-in and appearance | View and edit sign-in configuration, branding and social configuration |
| Integrations | View and edit webhooks, reveal webhook secrets; view, create and revoke API keys |
| Users | View authorized users, edit user records and revoke grants, edit a person's organization profile, view user analytics, ask to move a person's profile to another email address |
| Profiles | View and configure the organization profile, manage the organization's shared fields, manage an application's sign-up questions |
| Domains | View and manage custom domains |
| Billing | View billing, change plan and seats |
Held at organization level, the API key permissions also cover the organization's own API keys. Held through one application's override, they reach only that application's keys.
What only the owner can do
These are not permissions, so no role can grant them:
- delete the organization
- transfer its ownership
- delete an application
- move an application to another organization, or accept one moved in
Ownership
Handing it over
The owner starts a transfer and confirms it by signing in again. The new owner must be a member who can sign in and holds the permission to assign roles. The former owner stays in the organization with the Admin role, and both people are notified by email.
Naming a successor
The owner can name one successor: a member who can sign in and holds the permission to manage the organization. The member accepts or declines. Naming a successor transfers nothing, and changing it needs the owner to confirm by signing in again.
When the owner is unavailable
If the owner cannot be reached, a member can file a recovery request from the organization's settings. A onefold operator verifies it and, when an eligible member exists, moves ownership to the successor if one is named, or to another member who can sign in and holds the permission to manage the organization. The former owner stays as an Admin member unless onefold has restricted their account.
If the owner signs in, the request is cancelled. Nothing moves on a timer, and if no member is eligible, nothing moves.
Moving an application to another organization
An application moves to another organization when the owners of both organizations agree. It keeps its client ID, secret, redirect URIs and the people who use it, so nothing in your integration has to change.
The owner of the application's organization asks
On the application's Settings → General tab, under Danger zone, choose Transfer and enter the ID of the organization it should move to. You confirm it is you first, with a second factor or, if your account has none, a code sent to your email.
The other organization's owner accepts or declines
They are told by email, and the request waits in their organization's Applications list. Accepting needs them to confirm it is them the same way. Until then nothing moves, and you can cancel the request. A request nobody answers expires after seven days. You are told by email when it is declined or expires.
Only the two owners take part: no role or API key can ask for, accept or force a move.
When a move is refused
- The destination is the organization the application is already in, or does not exist.
- Either organization is suspended.
- The destination has reached its plan's application limit.
- The application already has a request waiting.
- The destination already uses the key of one of the application's private fields. The refusal names the keys; rename them on the application before asking again.
What moves, and what ends
| Moves with the application | Ends |
|---|---|
| Its client ID, secret, settings, API keys, webhooks, custom domains and branding | Its pending invitations of people to the application |
| Every person who authorized it, with their access: a person blocked from it stays blocked | The organization's per-application role overrides for it |
| Each person's values of the application's own private fields, and its user metadata | The password of the application's own mail server; its email is sent by onefold until you enter one again |
| Each person's social provider data for it | |
| Its subscription |
Each person gets a profile in the new organization, made from their account. The values the previous organization's shared and built-in fields hold stay with that organization.
What stays working
- Tokens. Access and refresh tokens issued before the move keep working, and
subdoes not change. The new organization's security policy applies from each token's next refresh. - Consent. Each person sees the consent screen once, at their next authorization, even when the application skips it.
- Billing. The subscription keeps charging the person who bought it. The new organization can cancel it, and cannot change its plan; once it ends, the new organization chooses its own.
- History. The new organization's activity log includes what happened to the application before the move. Someone from the previous organization who is not one of its members is shown by their role there and a reference, never by name. The previous organization keeps its own history of the application.
Nobody who uses the application is emailed, and no webhook event is sent.
Suspension
A onefold operator can suspend an organization. While it is suspended, none of its applications can sign anyone in. Its refresh, ID and access tokens, authorization codes, its applications' and its own API keys end, and its queued webhook deliveries are not sent. The owner is notified by email.
The organization, its applications, settings and members stay as they are. Restoring the organization brings nothing back that ended: create new API keys, and people sign in again.
Security policy
An organization can require more of the sign-in behind every authorization to its
applications. A member with the organization.manage permission sets it under Settings →
Security, after confirming their identity:
| Setting | What it does |
|---|---|
| Two-step verification | Every sign-in to the organization's applications has to include a second factor. A user who has none is sent to set one up before they can continue. |
| Maximum sign-in age | A sign-in older than this (from one minute to 90 days) has to be redone before an authorization proceeds, and a token whose sign-in has aged past it stops refreshing. No limit by default. |
| Reuse a sign-in across applications | On by default: a session signed in on onefold's own page or on another application's page counts. Off: each application accepts only a sign-in made on its own hosted sign-in page. |
An application can tighten the organization's policy for itself on its Sign-in tab, and never loosen it: a setting the organization already requires is shown there as required.
The policy is checked when an authorization starts, at the consent step, when a code is
exchanged, at every refresh and at introspection. A sign-in that does not meet it is asked
for what is missing on the hosted sign-in page and then continues. A token whose sign-in falls
short of it fails at its next refresh (see
When a token stops working); an
access token already issued keeps working until it expires. With prompt=none, the request
is answered with interaction_required or login_required instead (see
Errors at your callback).
For one person, a member with the authorized_users.manage permission can require a
sign-in again (that person's current tokens for the organization's applications end, and
their next authorization needs a fresh sign-in) or ask them to reset their password
(onefold emails the person a reset link that names the organization). Neither changes the
person's account itself.
Credential lifetime
The security policy also caps how long a credential may live, counted from when it was created: no cap, 30, 90 or 180 days, or one year. The organization's cap covers every application's API keys and the organization's own API keys. An application can set a lower cap for its own API keys on its Sign-in tab, and the stricter of the two applies there. Setting an application's cap needs the permissions to edit its sign-in configuration and to create and revoke its API keys.
- Creating or editing. An expiry later than the cap allows, or no expiry, is refused. In the portal, the choices past the cap are shown disabled, with the reason.
- Rotating. Rotation is never refused: the replacement key expires at its creation plus the cap.
- Saving a cap. The portal first shows how many credentials stop at once and how many are shortened. Saving sets every covered credential that would outlive the cap to expire at its creation plus the cap, so one already older than the cap stops at once. One entry in the activity log records the cap and the counts. Loosening a cap afterwards extends nothing.
No plan gates the cap.
What an organization shares
Depending on the organization's plan, its applications can inherit:
- Social provider credentials. Each application chooses, per provider, to use the organization's credentials or its own.
- Branding. The organization's look for the hosted sign-in page. Each application's own plan still decides which branding features render.
An organization also has its own analytics, activity log, and billing, covering the applications it owns.
Scopes and claims
Every scope a onefold application can request, the claims each one returns in the ID token and from userinfo, and how scopes relate to consent.
Plans and limits
The fixed limits of onefold, the limits and features that depend on your plan, what happens when you reach each one, and where to read the current values.