ember-simple-auth icon indicating copy to clipboard operation
ember-simple-auth copied to clipboard

Missing migration path for deprecated `responseJSON` and `responseText` property

Open BobrImperator opened this issue 9 months ago • 4 comments

During typescript migration we've noted that responseJSON and responseText properties returned from OAuth2PasswordGrantAuthenticator are deprecated. However I've overlooked the fact that there's no clear migration path for this.

Originally reported here: https://github.com/mainmatter/ember-simple-auth/pull/2883#issuecomment-2582732477

What are the alternatives for reponseJSON and reponseText? I use these to show the error returned by the backend on login and since the response you return has already been read, it's not an option to use that one.\

Is there any chance you could return a copy of the response (before it was read)? (or copy the response, read that one and send the original)

Draft: https://github.com/mainmatter/ember-simple-auth/pull/2922

BobrImperator avatar Jan 13 '25 18:01 BobrImperator