DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Data Engineering
  3. Databases
  4. Codeless OAuth API and Email API Attachments

Codeless OAuth API and Email API Attachments

Introduction to Codeless OAuth API for secure login with third-party authentication and attachments for Email API via REST, Codeless, and email templates.

Chris Fanchi user avatar by
Chris Fanchi
·
Nov. 10, 21 · Tutorial
Like (2)
Save
Tweet
Share
5.26K Views

Join the DZone community and get the full member experience.

Join For Free

The OAuth API allows you to get the full benefits of third-party OAuth login but with a new Codeless block, your application can include login with the likes of Facebook, Twitter, Google, Amazon, LinkedIn, Discord, GitHub, Spotify, and more.

In addition to the OAuth API, Backendless has also added new functionality for adding email attachments via API, which is also now available in Codeless. Email attachments – PDFs, images, videos, etc. – can even be added to email templates using Codeless. Read on to learn more.

OAuth Codeless block

OAuth 2.0 is a common protocol used by platforms such as Google, Facebook, Twitter, and others for user authentication and authorization. With the new Codeless block for OAuth, you can add third-party user authentication to your backend via API services or your frontend in UI Builder. OAuth makes login much easier for your users. In addition to not needing to remember yet another password, you can easily gather all of the registration info you need without your users having to fill out a form.

More importantly, the OAuth2 Login API authenticates user data through an external identity management system, ensuring that you’ll receive valid data for your most important fields. Learn more about configuring login providers here.

How To Utilize the OAuth Codeless Block

The OAuth Codeless block can be found in the Backendless (API) section of Codeless, in the Users API group. The block includes four arguments:

OAuth Codeless block

When you mouse over the block in your Console, you will see the instructions for each argument:

Argument instructions

Next, we’ll go over those instructions further.

  • Provider code – this code can be found in your Backend Console at Users > Login Providers as Reference in code
  • Redirect page – the name of the page that will be opened after login
  • Fields mappings (optional) – a mapping of user properties between the OAuth provider and Backendless
  • Scope (optional) – a collection of security scopes the client application is requesting the permissions for; if omitted, default provider scopes will be used

Add Attachment(s) To Custom Email Templates in Console

You can now easily add attachments to custom email templates that you create in Backendless Console. Simply click the Add Attachments button to add any file from your File Storage.

Adding attachments to custom email templates

Additionally, you can include attachments using the email API via REST request or Codeless logic in Cloud Code, UI Builder, or anywhere else you use Codeless.

Include attachments using the email API via REST request

As you can see in the above screenshot, you can add attachments whether you are creating a new email or using a template. The attachment does not have to be a standard part of the template; you can choose to only include attachments when it’s appropriate for the situation.

For example, let’s say you have a “support ticket” email template. In some cases, the user may want to include a screenshot of the issue they encountered; in other instances, they may not. You can easily set up the logic to include an attachment file from the page data to ensure that any attachment(s) are included. If there are none, then the field is ignored.


That’s all for now. Happy Codeless Coding!

API authentication security

Published at DZone with permission of Chris Fanchi. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Distributed SQL: An Alternative to Database Sharding
  • Public Cloud-to-Cloud Repatriation Trend
  • Key Considerations When Implementing Virtual Kubernetes Clusters
  • Spring Boot Docker Best Practices

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: