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

MB web service v1 will be dropped #3

Closed
jesus2099 opened this issue Feb 1, 2018 · 14 comments
Closed

MB web service v1 will be dropped #3

jesus2099 opened this issue Feb 1, 2018 · 14 comments

Comments

@jesus2099
Copy link

As written in https://blog.musicbrainz.org/?p=6942 they will abandon version 1 web services.

<form action="https://musicbrainz.org/ws/1/track/" method="post">

If you are one of the few authors of software that has not updated your software to use the newer ws/2 endpoint, your software’s MusicBrainz functionality will cease to work after 1 August.

😱

@kepstin
Copy link
Owner

kepstin commented Jan 21, 2019

Oh no.

Sadly, ws/2 isn't really an option here, since it doesn't (as far as I know?) support submissions with "form" format, so there's no easy way to do the submission from the browser without them providing their authentication credentials to the web application.

@kepstin
Copy link
Owner

kepstin commented Jan 21, 2019

It looks like implementing an OAuth2 authentication flow that runs purely in the browser (js) should be possible, it's fairly similar to how it works for a standalone app like picard. I'll take a look at adding this.

@jesus2099
Copy link
Author

It sounds complex, though… :/

@jesus2099
Copy link
Author

jesus2099 commented Jan 22, 2019

I don’t know anything about oauth or oauth2…
I found this and that which show that we could require so many lines of codes just to log in, now.

@kepstin
Copy link
Owner

kepstin commented Jan 23, 2019

I'm currently working on a prototype of OAuth2 flow. You can follow the status by poking at https://magicisrc-beta.kepstin.ca/ - preferably with a browser console open and persistent logs enabled.

I'm currently blocked by MBS-9993 (MusicBrainz server should allow CORS requests to /oauth/token), which is preventing me from getting back the auth token to use when making future musicbrainz webservice requests.

@jesus2099
Copy link
Author

If we ran the ISRC submit form hosted on the musicbrainz.org/release/mbid page itself through a userscript, maybe it would not ask for athentication?

@kepstin
Copy link
Owner

kepstin commented Jan 23, 2019

Huh. it looks like the /ws/2 endpoints do actually use the musicbrainz.org web site session as authentication. At the very least, things like ?inc=user-tags works for my currently logged in user. If this is also true for the isrc submission endpoint, implementing it as a userscript running on the musicbrainz.org origin should be doable, yes.

I'd still like to have a version externally hosted, so it can be used without a userscript installed.

@kepstin
Copy link
Owner

kepstin commented Jan 28, 2019

OAuth2 flow is currently functional on https://magicisrc-beta.kepstin.ca/ (using the "beta" branch from this repo) - you can login, logout, and load the release editor. (Note that the beta site is currently backended on the https://test.musicbrainz.org/ server, which has passwords reset to "mb")

ISRC validation and submission is still to be implemented.

@kepstin
Copy link
Owner

kepstin commented Feb 13, 2019

Currently blocked on https://tickets.metabrainz.org/browse/MBS-6033 - the ws/2 endpoints do not allow authenticated cross-domain ws requests.

@kepstin
Copy link
Owner

kepstin commented Jun 11, 2019

https://magic-isrc-beta.kepstin.ca/ now works using beta.musicbrainz.org

Note that if you use the link https://www.kepstin.ca/magicisrc/ with parameters, the parameters will be preserved when you click on the "Please try the Beta version" link, and the prefill works.

@jesus2099
Copy link
Author

https://magic-isrc-beta.kepstin.ca/https://magicisrc-beta.kepstin.ca/ ;-P

@jesus2099
Copy link
Author

It was quite tedious without #2 (which can be closed, maybe) but it worked!
Thanks very much. :)

@kepstin
Copy link
Owner

kepstin commented Jul 1, 2019

The required changes were included in the 2019-06-30 Musicbrainz Server update, so I've pushed the ws/2 version of MagicISRC live now.

It can be accessed at https://magicisrc.kepstin.ca/ or via the legacy URL https://www.kepstin.ca/magicisrc/ (the latter is a redirect that preserves seeded parameters)

@kepstin kepstin closed this as completed Jul 1, 2019
@jesus2099
Copy link
Author

Congratulations 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants