Apostrophe CMS Main Site Forum Home

Unable to Login


#1

Hello,
I am trying out Apostrophe for the first. I seem to have a successful install with MongoDB but am unable to log in.

I ran

node app.js apostrophe-users:add admin admin.

but it did not prompt me to create a password.

I received the following error message.

WARNING: No session secret provided, please set the secret property of the session property of the apostrophe-express module in app.js

There is no such task.

The following tasks are available:

apostrophe-db:reset
apostrophe-caches:clear
apostrophe-migrations:migrate
apostrophe:generation
apostrophe-attachments:rescale
apostrophe-pages:unpark
apostrophe-search:index
apostrophe-rich-text-widgets:list
apostrophe-html-widgets:list
apostrophe-video-widgets:list
apostrophe-users:add
apostrophe-users:change-password
apostrophe-images-widgets:list
apostrophe-files-widgets:list


#2

To follow up, I try to run app.js after and get

WARNING: No session secret provided, please set the secret property of the session property of the apostrophe-express module in app.js
I see no data/address file, defaulting to address 0.0.0.0
I see no data/port file, defaulting to port 3000
Listening on http://0.0.0.0:3000

This is my app.js file

var apos = require(‘apostrophe’)({
shortName: ‘cms’,
title: ‘cms’,

// See lib/modules for basic project-level configuration of our modules
// responsible for serving static assets, managing page templates and
// configuring user acounts.

modules: {
// Add custom apostrophe-modules and their respective configuration here!
}
});


#3

Got it resolved but really not sure why. Have decided on another solution but hope the Apostrophe project continues as it shows some promise.


#4

Hi @digitalhome, you might simply want to had a secret to your app.js doing like so ( inside “modules: { }” ) :

'apostrophe-express': {
  port: 8080, // You can decide on which port to listen to run the app (ex: http://localhost:8080)
  session: {
   secret: 'WhateverTheRandomSecretYouWant'  // Any type of string works, rather be not too short
  }
}

#5

Hi @digitalhome, glad you were able to sort it out. I think you probably had a typo when you actually ran the command the first time; I just copied and pasted your exact command and it worked.

What solution did you choose instead? What were the pros and cons?

Thanks!