Skip to content
This repository has been archived by the owner on Apr 5, 2022. It is now read-only.

How to redirect back to website? #72

Open
ghost opened this issue May 10, 2018 · 0 comments
Open

How to redirect back to website? #72

ghost opened this issue May 10, 2018 · 0 comments

Comments

@ghost
Copy link

ghost commented May 10, 2018

I am trying to implement this example on my server but the problem is that I'm having a slightly different setup.

I am having a website on (client) https://localhost:4200 which talks to the REST API on (server) https://localhost:8443.

One of my problems at the moment is that the last redirect will be back to (server) https://localhost:8442 and not to the calling website.

What I see is that after authorization the endpoint /signup is getting called:

@RequestMapping(value = "/signup", method = RequestMethod.GET)
public SignUpForm signupForm(WebRequest request) {
    Connection<?> connection = providerSignInUtils.getConnectionFromSession(request);
    if (connection != null) {
        request.setAttribute("message", new Message(MessageType.INFO, "Your " + StringUtils.capitalize(connection.getKey().getProviderId()) + " account is not associated with a Spring Social Showcase account. If you're new, please sign up."), WebRequest.SCOPE_REQUEST);
        return SignUpForm.fromProviderUser(connection.fetchUserProfile());
    } else {
        return new SignUpForm();
    }
}

and for some reason after finishing this call, the web client gets redirected to (server) https://localhost:8443/signup

Anyway, is there a way to extend https://github.com/spring-projects/spring-social-samples or is there any example out there with a similar setup than mine? I'm looking for quite a while now but I'm stuck.

Btw I am having this question on stackoverflow in case somebody can help here.

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

No branches or pull requests

0 participants