Welcome to the OpenCities help centre. Search for what you're after, or browse the categories.
Can't find what you're looking for? Submit a support ticket and we'll be in touch.

Follow

Set up MyCity social sign in

avatar of OpenCities Product Team

OpenCities Product Team

Last updated

You can set up social sign-in for your MyCity portal to make it easier for your users to sign in and manage their accounts. As long as you enable it and set it up, users can log in using Facebook, Google, LinkedIn, and Microsoft; these platforms are most likely to host pages for businesses or community groups.

MyCity login with social sign in

Enable social sign in

You can enable social sign-in from your Site Management settings but first, ensure that you're working in your MyCity site using the site picker in the top left corner of the main menu.

  1. From the main menu, go to More > Site Management > your MyCity site > Settings.
  2. Select Log in.
    log in icon in site management
  3. Ensure your Sign in/Registration process pages are correct before enabling social sign-in. After setting up social sign-in, changing your Login page can interfere with your site, so be careful if you need to change your Login page in Site Management
  4. Under Social sign in, switch the Enable setting to Yes.
  5. You'll need to set up each social platform you want to use. You can set up Facebook, Google, LinkedIn, and Microsoft.

Facebook

To set up Facebook social sign-in:

  1. Open a new window in your browser and go to the Facebook for Developers site
  2. Select Get Started to register, then follow the steps to create an app. You may already have an app for embedding a Facebook feed on your site, but you'll need to create a new one for social sign-in. Keep in mind that users may see your app details, so use a meaningful Display Name (such as MyCity sign-in) and Contact Email.
  3. You'll be asked to select an app type. Choosing Consumer or Business will give you access to the Facebook Login product.
  4. Add the Facebook Login product to your app. When it asks for your Site URL, enter your MyCity website domain (e.g., mycity.opencities.com).
  5. Go to the Facebook Login product settings and enter the URL of your login page for your MyCity site (e.g., https://mycity.opencities.com/mycity/Log-in) in the Valid OAuth Redirect URIs field.
  6. Go to the app settings and copy your App ID and App secret.
  7. Go back to your OpenCities admin and from the main menu, go to More > Site Management > your MyCity site > Settings > Log in.
  8. Under your Facebook Social sign in settings, paste the App ID and App Secret into the matching fields.
  9. Select Save Settings and Save. Make sure you test your Facebook social sign-in.

If you need help with this, check out the Facebook for developers support page.

Google

To set up social sign-in with Google:

  1. Open a new window in your browser and go to the Google API console.
  2. Create a project, enable Google People API in your Google project, and follow Google’s instructions to set up OAuth 2.0.
  3. When creating the OAuth client ID, choose Web application as the Application type.
  4. In the Authorized redirect URIs field, enter the URL for the login page of your MyCity site (e.g., http://mycity.opencities.com/mycity/Log-in).
  5. Copy your client ID and client secret.
  6. Go back to your OpenCities admin and from the main menu, go to More > Site Management > your MyCity site > Settings > Log in.
  7. Under the Google Social sign in settings, paste your client ID and client secret into the matching fields.
  8. Click Save Settings, then Save.

It might take some time for Google to approve your credentials. Give it a few minutes before you test the sign-in.

If you need help with any of this, check out the Google API Console Help.

LinkedIn

To set up social sign-in with LinkedIn:

  1. Open a new window in your browser and go to Linkedin for developers.
  2. Follow Linkedin’s instructions to authenticate with OAuth 2.0.
  3. When Linkedin asks for your Authorized Redirect URIs, enter the URL for the login page of your MyCity site (e.g. http://mycity.opencities.com/mycity/Log-in).
  4. Copy your Client ID and Client Secret.
  5. Go back to your OpenCities admin and from the main menu, go to More > Site Management > your MyCity site > Settings > Log in.
  6. Under the LinkedIn Social sign in settings, paste your Client ID and Client secret into the matching fields.
  7. Click Save Settings, then Save. Make sure you test your LinkedIn social sign-in.

If you need help with any of this, check out the Linkedin Developer Support.

Microsoft

To set up social sign-in with Microsoft:

  1. Open a new window and go to the Microsoft Application Registration Portal.
  2. Follow Microsoft’s instructions to register an app. Your app’s Platform should be Web.
  3. When Microsoft asks for your Redirect URLs, enter the URL for the log in page of your MyCity site (e.g. http://mycity.opencities.com/mycity/Log-in).
  4. When you set Microsoft Graph Permissions, choose the Delegated Permissions ‘User.Read’ and ‘User.ReadBasic.All’.
  5. Copy the Application Id into a notepad.
  6. In the Application Secrets section, select Generate New Password. Copy the password into a notepad.
  7. Go back to your OpenCities admin and from the main menu, go to More > Site Management > your MyCity site > Settings > Log in.
  8. Under the Microsoft Social sign-in settings, paste your Application Id into the Client Id field, and your Application Secret password into the Client secret field.

If you need help with any of this, check out the Microsoft Azure documentation.

Test your social sign in

To test your social sign-in is working, go to your MyCity site and attempt to log in through each platform that you have connected. If the MyCity login page takes you to the relevant social media login page or a page to create an account, then they're working properly.

Remember that Google can take time to approve the credentials, so you'll need to wait a few minutes before testing the sign-in. 

What's next?

Was this article helpful?
0 out of 0 found this helpful