<commit_before>const querystring = require('querystring');

module.exports = {
  method: 'GET',
  path: '/facebookLogin',
  config: {
    auth: false,
  },
  handler: (request, reply) => {
    const params = {
      client_id: process.env.FACEBOOK_CLIENT_ID,
      redirect_uri: `${process.env.BASE_URL}/welcome`,
    };

    const base = 'https://www.facebook.com/dialog/oauth?';
    const query = querystring.stringify(params);
    return reply.redirect(base + query);
  },
};<commit_msg>Changed facebook redirect_uri It's not the same as the one mentioned on facebook, namely: registration. Relates to issue #58<commit_after>const querystring = require('querystring');

module.exports = {
  method: 'GET',
  path: '/facebookLogin',
  config: {
    auth: false,
  },
  handler: (request, reply) => {
    const params = {
      client_id: process.env.FACEBOOK_CLIENT_ID,
      redirect_uri: `${process.env.BASE_URL}/registration`,
    };
    console.log(params.redirect_uri);

    const base = 'https://www.facebook.com/dialog/oauth?';
    const query = querystring.stringify(params);
    return reply.redirect(base + query);
  },
};
{'fraction_non_alphanumeric': 0.14638447971781304, 'fraction_numerical': 0.001763668430335097, 'mean_word_length': 3.6707818930041154, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '2332709', 'n_tokens_mistral': 365, 'n_tokens_neox': 355, 'n_words': 77}