Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7196671
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T20:49:22+00:00 2026-05-28T20:49:22+00:00

I could do with some help on my REST API. I’m writing a Node.js

  • 0

I could do with some help on my REST API. I’m writing a Node.js app which is using Express, MongoDB and has Backbone.js on the client side. I’ve spent the last two days trying to work out all of this and not having much luck. I’ve already checked out:

  • Securing a REST API
  • Securing my REST API with OAuth while still allowing authentication via third party OAuth providers (using DotNetOpenAuth)
  • http://www.thebuzzmedia.com/designing-a-secure-rest-api-without-oauth-authentication/
  • http://tesoriere.com/2011/10/10/node.js-getting-oauth-up-and-working-using-express.js-and-railway.js/

I want to keep my backend and frontend as separate as possible so I thought about using a carefully designed REST API would be good. My thinking is that if I ever get round to developing an iPhone app (or something else like that), it could use the API to access data.

BUT, I want this to be secure. A user has logged into my web app and I want to ensure my API is secure. I read about OAuth, OAuth 2.0, OpenID, Hmac, hashes etc… I want to avoid using external logging in (Facebook/Twitter/etc) I want the registering and logging in to be on my app/server.

…but I’m still confused here. Maybe it’s late at night or my brain is just fried, but I could really do with some steps on what to do here. What are the steps for me to create a secure API?

Any help, any information, any examples, steps or anything would be great. Please help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T20:49:23+00:00Added an answer on May 28, 2026 at 8:49 pm

    Here’s a different way of thinking about it:

    Let’s suppose for a moment that you’re not using an API. Your user logs into the app, providing some credentials, and you give a cookie or similar token of some sort to the user, which you use to identify that user has logged in. The user then requests a page containing restricted information (or creating/modifying/deleting it), so you check that this token to ensure that the user is allowed to view that information.

    Now, it sounds to me that the only thing you’re changing here is the way that information is delivered. Instead of delivering the information as rendered HTML, you’re returning the information as JSON and rendering it on the client side. Your AJAX requests to the server will carry that same logged-in token as before, so I suggest just checking that token, and restricting the information down to ‘just what the user is allowed to know’ in the same way.

    Your API is now as secure as your login is – if anyone was to know the token necessary for accessing the api, they would also be logged into the site and have access to all the information anyway. Best bit is, if you’ve already implemented login, you’ve not really had to do any more work.

    The point of systems such as OAuth is to provide this ‘logging in’ method, usually from a third party application and as a developer. This would potentially be a good solution for an iPhone app or similar, but that’s in the future. Nothing wrong with the API accepting more than one authentication method!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I could use some help writing a regular expression. In my Django application, users
I could use some help creating an XSL template that will take a string
i have an issue i could use some help with, i have python list
I'm new to SQL and could use some help in creating a database schema
I am getting the following error and could use some help resolving it. Anyone
We're having a small issue and could use some help - we have the
I have a piece of code here that i really could use some help
I'm just starting to learn T-SQL and could use some help in understanding what's
I am fairly new to OOP and wondered if you could provide some help
Iam getting the following error , could some one help me how to fix

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.