Bruker tofaktorautentisering

Tofaktorautentisering (2FA) er en måte å beskytte Nextcloud-kontoen din mot uautorisert tilgang. Det fungerer ved å kreve to forskjellige «bevis» på identiteten din. For eksempel, noe du vet (som et passord) og noe du har som en fysisk nøkkel. Vanligvis er den første faktoren et passord som du allerede har, og den andre kan være en tekstmelding du mottar eller en kode du genererer på telefonen eller en annen enhet (noe du har). Nextcloud støtter en rekke andre faktorer, og flere kan legges til.

Once a two-factor authentication app has been enabled by your administrator, you can enable and configure it in Angir preferansene dine.

Konfigurer tofaktorautentisering

In your personal settings, look up the Second-factor Auth setting. In this example this is TOTP, a Google Authenticator compatible time-based code:

TOTP-konfigurasjon.

Du vil se hemmeligheten din og en QR-kode som kan skannes av TOTP-appen på telefonen din (eller en annen enhet). Avhengig av appen eller verktøyet, skriv inn koden eller skann QR-en, og enheten din vil vise en påloggingskode som endres hvert 30. sekund.

Recovery codes if you lose your second factor

You should always generate backup codes for 2FA. If your second factor device gets stolen or stops working, you can use one of these codes to unlock your account. It effectively functions as a backup second factor. To get the backup codes, go to your personal settings and look under Second-factor Auth settings. Choose Generate backup codes:

2FA reserve kode generator

You will then see a list of one-time-use backup codes:

2FA-reservekoder

Store these codes somewhere safe where you can find them. Do not keep them with your second factor (such as your mobile phone), but store them separately so that losing one does not mean losing the other.

Logget inn med tofaktorautentisering

After you log out and log in again, you will see a prompt to enter the TOTP code in your browser. If you have enabled more than one second factor, you will see a selection screen where you can choose which method to use for this login. Select TOTP:

Velge en tofaktorautentiseringsmetode.

Nå, bare legg til koden din:

Angi TOTP-kode ved innlogging.

Hvis koden var riktig, blir du omdirigert til Nextcloud-kontoen din.

Merknad

Since the code is time-based, it is important that your server’s and your smartphone’s clock are almost in sync. A time drift of a few seconds won’t be a problem.

Bruke tofaktorautentisering med maskinvaretokener

Du kan bruke tofaktorautentisering basert på maskinvaretokener. Følgende enheter er kjent for å fungere:

Bruke klientapplikasjoner med tofaktorautentisering

Once you have enabled 2FA, your clients will no longer be able to connect with just your password unless they also have support for two-factor authentication. To solve this, you should generate device-specific passwords for them. See Administrer tilkoblede nettlesere og enheter for more information on how to do this.

Hensyn

If you use WebAuthn to log in to your Nextcloud, be sure to not use the same token for 2FA, as this would mean you are again only using a single factor.