Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to OAuth2 Authentification #56

Open
akuma06 opened this issue Jul 24, 2017 · 3 comments
Open

Move to OAuth2 Authentification #56

akuma06 opened this issue Jul 24, 2017 · 3 comments

Comments

@akuma06
Copy link
Member

akuma06 commented Jul 24, 2017

For security reasons and to be able to provide more user-specific features to the app, the nyaa API 1.2 will introduce a new way to login. This will be done by a standard OAuth2 Autorization server and a Consent Server.
I'm doing the code for it. The oauth2 api will completely follow the oauth2 standard.

The api endpoints will be:

Now that I have implemented the oauth api part on nyaa, I would like which authorization flow should we use? @ltype @xdk78
For example we can either display a a web form from https://nyaa.pantsu.cat/oauth2/auth, let the website handle the login + the grant and then take the token at the end.
Or we can use our own login form and directly send the credentials to the token api url to get the token.

Moreover I would like some ideas on where should we put the API_KEY and API_SECRET (private key) in the code. Since we need to have them available here for travis to compile our releases.

@akuma06 akuma06 added this to the v1.3 milestone Jul 24, 2017
@akuma06
Copy link
Member Author

akuma06 commented Jul 27, 2017

Updated status, need some feedback @xdk78 @ltype

Edit: I also found those two libraries for the oauth workflow
https://github.com/openid/AppAuth-Android
https://github.com/wuman/android-oauth-client

@xdk78
Copy link
Contributor

xdk78 commented Sep 29, 2017

@akuma06 so, when Pantsu(website) api will be ready for OAuth?

@akuma06
Copy link
Member Author

akuma06 commented Sep 29, 2017

I have a lot of work on my end recently so, as soon as I'm free ^^'.
But website part is already functional. We only need to implement it in the app

@xdk78 xdk78 self-assigned this Feb 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants