<commit_before>export default function socialSignUp(context, payload, done) {
    context.service.create('user.socialregistration', payload, { timeout: 20 * 1000 }, (err, res) => {
        if (err) {
            context.dispatch('SOCIAL_CREATE_USER_FAILURE', err);
        } else {
            res.picture = payload.picture || '';
            context.setUser(res); //save user as cookie via userStoragePlugin
            context.dispatch('SOCIAL_SIGNIN_SUCCESS', res);
            try {
                location.reload();
            } catch (e) {
                //nothing - server side
            }
        }
        done();
    });
}<commit_msg>[SWIK-2005_redirect_to_profilepage_after_signup] Added navigation to user profile after social sign up<commit_after>import {navigateAction} from 'fluxible-router';
const log = require('../../log/clog');

export default function socialSignUp(context, payload, done) {
    log.info(context);
    context.service.create('user.socialregistration', payload, { timeout: 20 * 1000 }, (err, res) => {
        if (err) {
            context.dispatch('SOCIAL_CREATE_USER_FAILURE', err);
        } else {
            res.picture = payload.picture || '';
            context.setUser(res); //save user as cookie via userStoragePlugin
            context.dispatch('SOCIAL_SIGNIN_SUCCESS', res);
            context.executeAction(navigateAction, {
                url: '/user/' + res.username + '/settings/profile'
            });
            try {
                location.reload();
            } catch (e) {
                //nothing - server side
            }
        }
        done();
    });
}
{'fraction_non_alphanumeric': 0.1267605633802817, 'fraction_numerical': 0.009797917942437232, 'mean_word_length': 2.020332717190388, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7046435', 'n_tokens_mistral': 451, 'n_tokens_neox': 425, 'n_words': 96}