Skip to content
This repository has been archived by the owner on Nov 8, 2021. It is now read-only.

User.authenticate's server argument could be more flexible #26

Open
kraenhansen opened this issue Jun 5, 2018 · 0 comments
Open

User.authenticate's server argument could be more flexible #26

kraenhansen opened this issue Jun 5, 2018 · 0 comments

Comments

@kraenhansen
Copy link
Member

In an attempt to work around https://github.com/realm/raas/issues/1075 I tried using WebPack dev servers ability to act as a proxy in-front-of your API (in this case I wanted it to be in front of ROS).

So I had the dev server proxy requests on http://localhost:8080/ros to my ROS instance on Realm Cloud. And I therefore wanted to pass http://localhost:8080/ros when constructing the user:

const user = await User.authenticate(
  credentials,
  'http://localhost:8080/ros',
);

But because of https://github.com/realm/realm-graphql/blob/master/src/authenticationHelper.ts#L19 the /ros part of the URL is removed and instead of appending /auth to the url it becomes http://localhost:8080/auth which fails with a 404.

I would expect the server URL passed to User.authenticate to be the base URL of the ROS server, which could potentially have some path defined.

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

No branches or pull requests

1 participant