Skip to content

Allow direct OAuth2 Authentication #445

@vhaudiquet

Description

@vhaudiquet

Is your feature request related to a problem? Please describe.
I have previously obtained an OAuth2 Spotify access token, and would like to use that to authenticate librespot 'Session'.
I'm building an android app and using the official Spotify Auth library, so that the user does not give me his credentials directly.

Describe the solution you'd like
Either make private Authentication.LoginCredentials loginCredentials public, or make a setter, so that i can directly set the LoginCredentials object ; or make an oauthToken() method in builder that constructs the loginCredentials object (i.e. what the FacebookAuthenticator does) from an access token.

Describe alternatives you've considered

Additional context
I think this would also allow users of the library to go arround the maybe broken Facebook login implementation (i saw an issue on that and a PR that was not yet merged) ; they could, if they really need to, implement OAuth2 directly to connect with Facebook (what i did in my app, using okhttpclient, using authorization code flow, requesting access and refresh token.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions