play-authenticate icon indicating copy to clipboard operation
play-authenticate copied to clipboard

"AskSignup" enhancement to confirm Terms of Services before a user is created

Open cnmuc opened this issue 10 years ago • 1 comments

Hi joscha, I'd like to show a page where a user confirms my "terms of services" after an external provider (e.g., Google) redirects to my application and before the user gets signed up. My first idea was to do it similar as askMerge/askLink, something like (PlayAuthenticate.java):

...
else if (!isLoggedIn) {
    if (isAccountAutoSignup()) {
        loginUser = signupUser(newUser, session, ap);
    } else {
        final Call c = getResolver().askSignup();
        if (c == null) {
            throw new RuntimeException(
                    Messages.get(
                            "playauthenticate.core.exception.signup.controller_undefined",
                            SETTING_KEY_ACCOUNT_AUTO_SIGNUP));
        }
        storeSignupUser(newUser, session);
        return Controller.redirect(c);
    }
}
...

Should I provide a changeset with this implementation? Do you have any other idea how to do it?

cnmuc avatar Feb 03 '14 09:02 cnmuc

@cnmuc seems as if this is something that we could actually implement generically with an interceptor, that can be implemented - link and merge would just be two specific implementations then - and you would have a specific TOS implementation of it - if you would be willing to contribute that, that'd quite cool!

joscha avatar Feb 23 '14 20:02 joscha