App passwords
An app password is a password that FileRun makes for one program that connects to your account without the browser: the desktop sync app, a mobile app, a WebDAV client or a script that uses the API. This page describes the two ways a program gets one, where they are listed, how to revoke them, how long they last, and who cannot use them.
Important
FileRun refuses the password that you sign in with, when a program sends it. Only an app password works, whatever the settings of your account.
Each app password belongs to your account, has a name, and is listed on the Connected apps page of
your account settings. Which of the two ways applies depends on what the program asks for when you
set it up.
When the program asks for your FileRun address
The desktop sync app and the mobile apps ask only for the address of your FileRun installation. They open FileRun in your browser, where you approve the connection:
- In the program, type the address of your FileRun installation. The program opens a FileRun page in your browser.
- Sign in, if FileRun asks you to. See Signing in.
- Confirm your identity, if FileRun asks you to. See Confirming your identity.
- The page
Authorizationshows "An application would like to connect to your account." ClickAccept. - The page shows "Success!" and "Please return to your remote application." Return to the program.
FileRun then creates the app password and gives it to the program. You never see it, and there is nothing to prepare before.
- The app password is listed on the
Connected appspage with the nameApp. Its details show the IP address of the device and the identification that the program sent. Cancelopens the file manager, and the program gets nothing.- Approve the connection within 15 minutes after the program started it. Later, the page shows "The authentication session expired. Please restart the authentication process from the application!"
- When the program is already connected to another account, the page shows "The application is
connected to a different account than the one you are signed in with." Click
Sign in as a different user, and sign in with that account. - While
Mobile and desktop appsis off, underFiles→Settings→Featuresin the control panel, FileRun refuses the page with "Access from the mobile and desktop apps is disabled.", and creates no app password.
See Desktop sync and Mobile apps.
When the program asks for a username and a password
A WebDAV client, and any other program that cannot open the browser, asks for a username and a password. For such a program, you create the app password yourself.
Create one app password for each device or program, and do not use it in two places. You can then revoke one device later without disturbing the others.
- Click your name, at the bottom of the panel on the left, and choose
Connect app. TheConnected appspage of the account settings opens in a new browser tab. You can also openAccount settings→Connected apps. - Confirm your identity, if FileRun asks you to.
- Click
Connect app, at the top of the page. - In "Name this app:", type a name that tells you which device it is for, such as
Work laptop. The name is required. ClickOk. - The window shows the credentials. Type them in the program.
- Click
Done. The app password is then listed on the page.
The window shows these fields. The button with the tooltip Copy, at the right end of each field,
copies its value:
Username: an identifier of your account. It is not the username that you sign in with.Password: the app password.Connection URL via WebDAV: the address for a WebDAV client. It is shown only when WebDAV is on. See Accessing via WebDAV.Connection URL via desktop or mobile app: the address of the installation, for the desktop sync app and the mobile apps. It is shown only when the mobile and desktop apps are on.
Show QR code shows a code that a mobile app can scan, instead of typing the values. The code holds
the address, the username and the password, so do not show it to other people. The button is shown
only when the mobile and desktop apps are on.
Important
The window shows the password only once: "Note that this information will not be displayed again." Type it in the program before you click
Done. If you lose it, revoke the app password, and create a new one.
Where they are listed
Account settings → Connected apps lists everything that is connected to your account:
- the app passwords that you created with
Connect app - the app passwords that FileRun created for a program that you approved in the browser
- the app passwords that the superuser created for your account through the API. See API: Generate app passwords.
- the programs that you authorized through the API. See Apps authorized through the API.
Each row shows the name and the date the entry was added. The details of a row show the IP address that the entry was created from, and the identification of the program, when FileRun recorded them. An app password that you created yourself records the IP address of your browser.
The list does not show the browsers that are signed in to your account. These are on the Sessions
page. See Sessions.
Revoking one
On the Connected apps page, click the button with the tooltip Revoke access on the row, and
confirm. The message is "Access revoked for the app." A program that signs in with the app
password, such as the desktop sync app, a mobile app or a WebDAV client, loses its access at once.
So does a program that used the app password to obtain access to the API: its access ends at once,
and does not wait for the end of its access token.
Revoke an app password when you stop using a device, when you lose a device, and when you do not recognize the entry.
How long they last
An app password expires two years after it was created. It does not last longer when it is used.
After that, the program can no longer connect, and the Connected apps page does not list the app
password.
To connect the program again, approve it again in the browser, or create a new app password and
type it in the program.
The administrator can set another period. See For administrators.
When FileRun revokes them
FileRun revokes every app password of your account, and the access of every program authorized through the API, when:
- you reset a forgotten password
- an administrator sets a new password on your account in the control panel. See After a change of the password.
- your account becomes an administrator account. See Administrator permissions.
- your account becomes a guest account
- your account is deleted
Changing your own password, on the Password page of the account settings, does not revoke them.
They keep working. If you think that somebody else had access to your account, revoke them
yourself.
While your account is deactivated, FileRun refuses its app passwords. See Deactivating a user account.
App passwords and two-factor authentication
FileRun does not ask for your second factor when a program uses an app password. The app password gives access to your files on its own, also when two-factor authentication is required.
This is why each device should have its own app password, and why you should revoke the ones that you no longer use.
- When you create an app password with
Connect app, FileRun asks you to confirm your identity first, with your strongest method, unless you confirmed it in the last five minutes. See Confirming your identity. - When a program asks for your FileRun address, you sign in and confirm your identity in the browser, in the same way.
See Two-factor authentication.
Guest accounts
Guest accounts cannot use app passwords:
- The menu of a guest has no
Connect app, and the account settings of a guest have noConnected appspage. - When a guest approves a program in the browser, the page shows "Your user account cannot be used to connect applications to this server."
- When an account becomes a guest account, FileRun revokes its app passwords.
Guests reach their files through the web interface only. See Guest accounts.
For administrators
These settings of the control panel decide what the users see:
- The users have no
Connect appand noConnected appspage when these three settings are all off:Enable API, underAPI→Settings, andWebDAVandMobile and desktop apps, underFiles→Settings→Features. WebDAVshowsConnection URL via WebDAVin the window of a new app password.Mobile and desktop appsshowsConnection URL via desktop or mobile appandShow QR code. While it is off, the desktop sync app and the mobile apps cannot complete their connection in the browser.
These options of the configuration file customizables/config.php change the app passwords. See
Advanced configuration.
1$config['system']['auth']['app_password_expiration'] = 'P1Y';
The period after which a new app password expires, as an ISO 8601 duration. The default is P2Y,
two years. The period applies to the app passwords created after the change.
1$config['system']['auth']['app_password_default_app_name'] = 'Nextcloud app';
The name of an app password that has no name of its own, such as the one that a program gets in
the browser. The default is App.
1$config['app']['ui']['show_connect_app'] = false;
Hides Connect app in the menu of the users and on the Connected apps page. The page itself still
lists and revokes the connected apps.