Welcome
Login
Sign up
Home
Solutions
Forums
How can we help you today?
Enter your search term here...
Search
Login
or
Signup
to submit a new ticket
Check ticket status
Start a new topic
Discussions
Kinvey Forums
JavaScript
Integrate Angular js
O
Oshri
started a topic
almost 7 years ago
Hi,
I have a angular js app that connect to Kinvey.
i success connect used $kinvey.init(); in my module app.
bat when i wont to get data from dataStore i get this error "You need to be logged in to execute this request."
The app is all about Events Calendar, in index.html i will show the events ( collection " Public").
In document, can only one user by logged in how can i poll data from Kinvey with applicatino user?
Thanks, Oshri
2 Comments
Oldest First
Popular
Newest First
Sorted by
Oldest First
M
Mark
said
almost 7 years ago
Even though the collection permission may be public, make sure you are [logged in](http://devcenter.kinvey.com/angular/guides/users#login) prior to retrieving data from the DataStore.
O
Oshri
said
almost 7 years ago
What i need to add is that:
var promise = $kinvey.init({
appKey : *********',
appSecret : '******************'
});
promise.then(function(activeUser) {
if(null === activeUser) {
return Kinvey.User.create();
}
}, function(error) {
status.trigger('error', error);
});
Login
or
Signup
to post a comment
More topics in
JavaScript
How do I use Kinvey in my web app?
Is it safe to include keys/secrets in my client-side JavaScript app?
Why is the activeUser null even though I am logged in?
Login does not work even though credentials are valid.
Social login doesn’t work.
Appending objects to an Array (HTML5 - JS)
New to node.js - need bootstrap to downloadfiles from Kinvey
Problem with Aggregation/Grouping
Internal Server Error using Twitter Sign Up
Data Store
See all 315 topics
Oshri
I have a angular js app that connect to Kinvey.
i success connect used $kinvey.init(); in my module app.
bat when i wont to get data from dataStore i get this error "You need to be logged in to execute this request."
The app is all about Events Calendar, in index.html i will show the events ( collection " Public").
In document, can only one user by logged in how can i poll data from Kinvey with applicatino user?
Thanks, Oshri