Step-by-Step Guide to Configuring "Less Secure App" to OAuth for Email SMTP Settings

 

Step 1: Add Redirect URLs to Google Cloud Console

  1. Log In:
  2. Access Credentials:
    • Navigate to APIs & Services > Credentials.
  3. Select or Create an OAuth Client:
    • Under OAuth 2.0 Client IDs, click on your existing application.
    • Or, create a new one if needed.
  4. Add Redirect URLs:
    • In the Authorized redirect URIs section, enter each required redirect URL. The Redirect URI is the base url for your Edsembli site, with /EmailAuth/GoogleAuthCallback added. 
  5. Save Changes:
    • Confirm and save your updates.

Step 2: Add Google Emails to Google Cloud Console

  1. Navigate to IAM Settings:
    • Go to IAM & Admin > IAM in Google Cloud Console.
  2. Add Email Addresses:
    • Add the required Google email addresses under your Google Administration account.
  3. Assign Roles:
    • Assign the necessary roles (e.g., OAuth Developer) to these emails.
  4. Save Configuration:
    • Save your changes to update the IAM settings.

Step 3: Add Client ID and Client Secret

  1. Access Email Settings:
    • In your application, navigate to:
      Web Application > Board and School > Setup > Email Settings.
  2. Modify Email Settings:
    • Click on Go to modify email settings.
  3. Enter Credentials:
    • Client ID: Enter the provided value.
    • Client Secret: Enter the provided value.
    • Reply Email Address: Use the email defined in Step 2.
  4. Connect with Google:
    • Click on the Connect with Google button.
  5. Authenticate:
    • You will be redirected to the Google Gmail login page.
    • Select the appropriate email (the one added in Step 2).
  6. Redirection and Verification:
    • After authentication, you will be redirected to the Dashboard page (note that future updates will redirect you directly to the Email Settings page).
    • Verify the connection by clicking on Test.