Skip to content

The current Activity cannot be detected. Ensure that you have called Init in your Activity or Application class. #297

@Srikanth-396

Description

@Srikanth-396

Affected component

Duende.IdentityModel.OidcClient

Version

6.0.0

Describe the bug

"I'm trying to use the MAUI Sample from https://github.com/DuendeSoftware/foss/tree/main/identity-model-oidc-client/samples/Maui and am attempting to log in from Android foreground service, which is causing the following issue:
'The current Activity cannot be detected. Ensure that you have called Init in your Activity or Application class.'
Does Duende provide a way to fix this, for instance, by launching it from its own activity?

Steps to reproduce

Use MAUI Sample from https://github.com/DuendeSoftware/foss/tree/main/identity-model-oidc-client/samples/Maui
Try to login from Android foreground service class.

Expected behavior

Application should allow login using Chrome Custom Tab without encountering the following issue: 'The current Activity cannot be detected. Ensure that you have called Init in your Activity or Application class.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions