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

  • SEARCH
  • Home
  • 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 8274005
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T07:37:05+00:00 2026-06-08T07:37:05+00:00

I have a Backbone application which handles public and private stuff. Public => Login,

  • 0

I have a Backbone application which handles public and private stuff.

Public => Login, Registration, News, etc.

Private => Chatting, other user specific information.

To secure the entire application I have a session-based authentication mechanism in node.js. This mechanism secures the backend-api. Now the question is how I can secure the front-end.

  1. How do I secure routes in Backbone
  2. How could I secure modules (requireJs) in Backbone

One idea I had was to split up the front-end into public and private and the server decides if it grants access to the private-assets.

What other front-end-secure concepts are out there?

To make it more specific:
I want to check client-side if the user is authenticated and I want to restrict loading require-js modules to unauthenticated people (to save bandtwitch)

  • 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-06-08T07:37:06+00:00Added an answer on June 8, 2026 at 7:37 am

    your server should provide an API to check if the current user (possibly via their cookies) it authenticated.

    In backbone, on your routes/navigations you can check to see if your user is authenticated and then execute code or not (probably calling a requireJS module after the auth check).

    To my knowledge there is no backbone thing that has the concept of user state. You could implement a setTimeout loop to request the auth state from your server, and then implement Backbone.Events on top of that to emit an event when the user is no authed, which your backbone app could listen to and then trigger the rendering of a login view, or route the user to a login page.

    I mainly user couchdb for my backend, and it has a $.couch.session function that will let me know of the state of the current user’s auth. you will most likely need to implement your own session function that hooks into your backend framework.

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

Sidebar

Related Questions

I have a backbone application which, upon load, needs to fetch data from four
I have a Rails application with the backbone-rails gem. Which works out fine but
I have an application which uses backbone hash routing. When the page reloads I
I have a very basic backbone (sample) application which just creates and destroys model
using Backbone.js we have an application, in which on a certain occasion we need
Let's suppose I have a web application made with Backbone, which use Backbone.Router for
I have a Backbone.js application that allows users to create graphs based on large
In my Backbone application I have a main view that shows previews of posts.
I'm developing application using backbone.js & jquery. I have following code in model: runReport:
I have JavaScript application, where I use client-side templates (underscore.js, Backbone.js). Data for initial

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.