Junior — Middle
What authentication methods do you know and can you describe their features?
sobes.tech AI
Answer from AI
Main authentication methods:
-
Password-based authentication
- User enters login and password.
- Simple and common method.
- Disadvantage: vulnerable to interception and password guessing.
-
Token-based authentication
- After login, the user receives a token (e.g., JWT).
- The token is used for subsequent requests.
- Convenient for REST APIs and distributed systems.
-
Two-factor authentication (2FA)
- Combination of password and second factor (SMS, app-generated codes).
- Increases security.
-
Certificate-based authentication
- Uses digital certificates to verify identity.
- Often used in corporate networks.
-
OAuth / OpenID Connect
- Protocols for authorization and authentication via third-party services (Google, Facebook).
- Allow users to log in without creating a separate account.
-
Biometric authentication
- Use of fingerprint recognition, face recognition.
- Requires specialized hardware.
In Python, libraries such as django.contrib.auth for Django or flask-login for Flask are often used to implement authentication, supporting various methods.