nextcloud / nextcloud/android

Wrong security key is used

Open
#11,177 14 comments 0 reactions 0 assignees View on GitHub
bug feature: authentication stable-3.23 technical debt
Dominant language
Kotlin
Stars
5.6k
Forks
2k
Avg merge
2d 18h
Merged PRs (30d)
92

Description

### ⚠️ Before posting ⚠️

- [X] This is a **bug**, not a question or an enhancement.
- [X] I've [searched for similar issues](https://github.com/nextcloud/android/issues) and didn't find a duplicate.
- [X] I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
- [X] I agree to follow Nextcloud's [Code of Conduct](https://nextcloud.com/contribute/code-of-conduct/).

### Steps to reproduce

1. Setup 'Two-Factor Authentication' and 'Passwordless Authentication' and add Yubikey as the device.
2. Login on Android using 'Log in with a device'
3. Two-factor authentication pops up, and says ' Use WebAuthn for second factor authentication'.

### Expected behaviour

Android should login

### Actual behaviour

Android mobile says 'Wrong Security Key is used' and does not login

### Android version

10

### Device brand and model

Samsung SM-N960F

### Stock or custom OS?

Stock

### Nextcloud android app version

3.23.0

### Nextcloud server version

25.0.2.3

### Using a reverse proxy?

Yes

### Android logs

_No response_

### Server error logs

```bash
{
"reqId": "redacted",
"level": 0,
"time": "2022-12-17T11:20:24+05:30",
"remoteAddr": "192.168.1.2",
"user": "redacted",
"app": "PHP",
"method": "GET",
"url": "/login/challenge/webauthn?redirect_url=/apps/files/",
"message": "Return type of Webauthn\\AuthenticationExtensions\\AuthenticationExtension::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice at /var/lib/nextcloud/apps/twofactor_webauthn/vendor/web-auth/webauthn-lib/src/AuthenticationExtensions/AuthenticationExtension.php#55",
"userAgent": "Samsung SM-N960F (Android)",
"version": "25.0.2.3",
"exception": {
"Exception": "Error",
"Message": "Return type of Webauthn\\AuthenticationExtensions\\AuthenticationExtension::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice at /var/lib/nextcloud/apps/twofactor_webauthn/vendor/web-auth/webauthn-lib/src/AuthenticationExtensions/AuthenticationExtension.php#55",
"Code": 0,
"Trace": [
{
"file": "/var/lib/nextcloud/apps/twofactor_webauthn/vendor/web-auth/webauthn-lib/src/AuthenticationExtensions/AuthenticationExtension.php",
"line": 18,
"function": "onError",
"class": "OC\\Log\\ErrorHandler",
"type": "::",
"args": [
8192,
"Return type of Webauthn\\AuthenticationExtensions\\AuthenticationExtension::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice",
"/var/lib/nextcloud/apps/twofactor_webauthn/vendor/web-auth/webauthn-lib/src/AuthenticationExtensions/AuthenticationExtension.php",
55
]
},
{
"file": "/usr/share/webapps/nextcloud/lib/composer/composer/ClassLoader.php",
"line": 571,
"args": [
"/var/lib/nextcloud/apps/twofactor_webauthn/vendor/web-auth/webauthn-lib/src/AuthenticationExtensions/AuthenticationExtension.php"
],
"function": "include"
},
{
"file": "/usr/share/webapps/nextcloud/lib/composer/composer/ClassLoader.php",
"line": 428,
"function": "Composer\\Autoload\\includeFile",
"args": [
"/var/lib/nextcloud/apps/twofactor_webauthn/vendor/composer/../web-auth/webauthn-lib/src/AuthenticationExtensions/AuthenticationExtension.php"
]
},
{
"file": "/var/lib/nextcloud/apps/twofactor_webauthn/lib/Service/WebAuthnManager.php",
"line": 264,
"function": "loadClass",
"class": "Composer\\Autoload\\ClassLoader",
"type": "->",
"args": [
"Webauthn\\AuthenticationExtensions\\AuthenticationExtension"
]
},
{
"file": "/var/lib/nextcloud/apps/twofactor_webauthn/lib/Provider/WebAuthnProvider.php",
"line": 109,
"function": "startAuthenticate",
"class": "OCA\\TwoFactorWebauthn\\Service\\WebAuthnManager",
"type": "->",
"args": [
{
"__class__": "OC\\User\\User"
},
"cloud.redacted.com"
]
},
{
"file": "/usr/share/webapps/nextcloud/core/Controller/TwoFactorChallengeController.php",
"line": 143,
"function": "getTemplate",
"class": "OCA\\TwoFactorWebauthn\\Provider\\WebAuthnProvider",
"type": "->",
"args": [
{
"__class__": "OC\\User\\User"
}
]
},
{
"file": "/usr/share/webapps/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
"line": 225,
"function": "showChallenge",
"class": "OC\\Core\\Controller\\TwoFactorChallengeController",
"type": "->",
"args": [
"webauthn",
"/apps/files/"
]
},
{
"file": "/usr/share/webapps/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
"line": 133,
"function": "executeController",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->",
"args": [
{
"__class__": "OC\\Core\\Controller\\TwoFactorChallengeController"
},
"showChallenge"
]
},
{
"file": "/usr/share/webapps/nextcloud/lib/private/AppFramework/App.php",
"line": 172,
"function": "dispatch",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->",
"args": [
{
"__class__": "OC\\Core\\Controller\\TwoFactorChallengeController"
},
"showChallenge"
]
},
{
"file": "/usr/share/webapps/nextcloud/lib/private/Route/Router.php",
"line": 298,
"function": "main",
"class": "OC\\AppFramework\\App",
"type": "::",
"args": [
"OC\\Core\\Controller\\TwoFactorChallengeController",
"showChallenge",
{
"__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer"
},
[
"webauthn",
"core.TwoFactorChallenge.showChallenge"
]
]
},
{
"file": "/usr/share/webapps/nextcloud/lib/base.php",
"line": 1047,
"function": "match",
"class": "OC\\Route\\Router",
"type": "->",
"args": [
"/login/challenge/webauthn"
]
},
{
"file": "/usr/share/webapps/nextcloud/index.php",
"line": 36,
"function": "handleRequest",
"class": "OC",
"type": "::",
"args": []
}
],
"File": "/usr/share/webapps/nextcloud/lib/private/Log/ErrorHandler.php",
"Line": 92,
"CustomMessage": "--"
}
}
```

### Additional information

Default browser on mobile is Firefox version 108.1.0

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.