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

React admin absolute redirectTo URL for OAuth 2 and OIDC #6464

Closed
Nefcanto opened this issue Jul 24, 2021 · 2 comments
Closed

React admin absolute redirectTo URL for OAuth 2 and OIDC #6464

Nefcanto opened this issue Jul 24, 2021 · 2 comments

Comments

@Nefcanto
Copy link

What you were expecting:
I expect to be redirected to keycloak login page, instead of /login page of react-admin.

What happened instead:
I'm redirected to /login page.

Steps to reproduce:
I'm trying to connect my react-admin to Keycloak.

My Keycloak is listening on https://accounts.domain.com, while my react-admin is deployed on https://admin.example.com.

So as you can see they are deployed on two completely different hosts.

Now I don't want to see login form on react-admin.

In other words, since keycloak has everything, including all UIs, I want to redirect my user to keycloak instead of showing him the default login form of react-admin.

Thus in my authProvider.js I have this code:

const authProvider = {
    checkAuth: params => {
        // let's say user is not logged in
        return Promise.reject({
            redirectTo: 'https://accounts.domain.com'
        });
    }
}

However, when I go to my admin panel, it redirects me to https://admin.example.com/#/https://accounts.domain.com.

In other words, it seems that react-admin does not understand that this is an absolute URL.

Environment

  • React-admin version:
    "react": "^17.0.2",
    "react-dom": "^17.0.2",
    "react-router-dom": "^5.2.0",
    "react-scripts": "4.0.3",
    "react-admin": "^3.17.0",
    "ra-input-rich-text": "^3.9.0",
    "base64url": "^3.0.1",
    "oidc-client": "^1.9.1"
  • Last version that did not exhibit the issue (if applicable):
  • React version:
  • Browser: Chrome 91
  • Stack trace (in case of a JS error):
@Nefcanto
Copy link
Author

Dear Marmelab,

I wanted to use your fascinating react-admin. But I had to abandon it. Here's why.

I understand that open-source software means huge dedication and usually, the team does not receive enough compensation from the community in return. But that's the open-source, and it has been like that for decades.

I also have a couple of open source projects, thus I'm not just a mere consumer. I'm also a producer.

However, by seeing that my issue does not get a simple answer within 2 days, and by looking at your issues frequency which is like one issue per every two days, and by seeing that your repo has more than 400 contributors, I realized that this means the serious risk for the future of my projects.

I'm a businessman and an entrepreneur. I know it very well that we should pay a lot for a product to be born.

However, I also know that all you have to do to answer issues is less than 1 hour per day, to at least give the users of your repo a sense of "involvement" and "security".

I read your last 10 issues myself, and almost understood them each in like 10 minutes. And I'm new to your repo. A maintainer who knows it can answer each issue in less than an hour.

This means 1 man/hour per day or 30 men/hour per month. And it seems that you don't even put that amount of support for your repo base.

Of course, no user has any right to complain, as long as things are free. "Either choose or go away" is the mantra for free stuff. But I think you don't deserve the reputation you have based on the way you respect your repo users and based on your contributors count.

Anyway, I'm an interested, yet very disappointed user who wanted to use your repo, and got stuck in a very critical step of extensibility, and got no answer and thus had to leave it for another platform after almost a month of building stuff using your repo. That's the reality of your repo.

Please don't delete this comment.

Good luck.

@fzaninotto
Copy link
Member

Hi,

You're obviously a much better open-source maintainer than we are, so you should definitely build your own react-admin.

And since you also work on week-ends (which we do our best to avoid, to keep a sane work/life balance), it should not take long.

Cheers!

@marmelab marmelab locked and limited conversation to collaborators Jul 26, 2021
fzaninotto added a commit that referenced this issue Jul 27, 2021
ogustavo-pereira pushed a commit to ogustavo-pereira/react-admin that referenced this issue Nov 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants