- I have service that I want users to subscribe to and I want to authenticate the user so not just anyone can access the website.
Want this all to be server side. This is not an Application running on BB.
At first I thought I could read the BB Pin via Java (or something) but thats a no-go. Then I thought I could place a cookie on BB from my website when someone subscribes but having problem saving and retrieving cookie.
I could force user to log on EACH time with User & Password but thats a pain for the user.
Any suggestions? I'll take whatever I can get.
Thanks in advance.05-22-09 07:48 PMLike 0 - Why not do an extremely small BB app - it would act as a launcher to your website, but only if they entered in their username/pass and it was stored on the BB. Think AOL IM, ICQ, MSN, etc how you save your login info... if its saved then it goes straight to the site and authenticates the login information. If not, it prompts to enter your username/pass then luanches the site and passes the info.05-22-09 09:39 PMLike 0
- Why not do an extremely small BB app - it would act as a launcher to your website, but only if they entered in their username/pass and it was stored on the BB. Think AOL IM, ICQ, MSN, etc how you save your login info... if its saved then it goes straight to the site and authenticates the login information. If not, it prompts to enter your username/pass then luanches the site and passes the info.
Thanks again.
If anyone else has any ideas for handling on the server side, I'd appreciate any suggestions.05-23-09 04:41 PMLike 0 - Thanks for the info. Not sure if you read my entire post but thats what I was trying to do but not having much success. Have you done it and if so can you provide me some code or pointme in the right direction.
Any help would be greatly appreciated.
Thanks again.05-25-09 12:10 AMLike 0 -
And how are you trying to save and recover the cookies? PHP? It should work...since cookies work easily for every other website I visit on my BB I would say theres a tiny problem with your website coding (IIRC).05-27-09 07:02 PMLike 0 -
I can get cookies to work fine with Opera Mini but for some reason I can't set them using the Blackberry browser. I can't count on users having Opera. I set the cookie (same code on server for both browsers) yet when I go into cache on BB browser, it says 0 cookies. Obviously at that point I can't read them either. Go into Opera, go to same page and cookies get set, and cookies are read back without a problem.
Any suggestions?
This is my code. Can't get any simpler...
set Cookie
<?php
$value = 'Test';
setcookie("TestCookie", $value, time()+240);
?>
ReadCookie
<?php
// Print an individual cookie
echo $_COOKIE["TestCookie"];
// Another way to debug/test is to view all cookies
print_r($_COOKIE);
?>
Works with multiple cookies in Opera. Expiration set for 4 minutes but tested immediately. Tested in Blackberry, Firefox, & Internet Explorer mode.
Thanks05-28-09 01:30 PMLike 0 - i dont see why that wouldn't work....
Instead of the setcookie() function try something like this. I know its arbitrary and I can't pull up my old code right now (its at work..) to see if this is what I used but give it a shot.
Code:$_COOKIE['TestCookie'] = $value;
Code:echo $_COOKIE['TestCookie'];
05-28-09 05:59 PMLike 0 - i dont see why that wouldn't work....
Instead of the setcookie() function try something like this. I know its arbitrary and I can't pull up my old code right now (its at work..) to see if this is what I used but give it a shot.
Code:$_COOKIE['TestCookie'] = $value;
Code:echo $_COOKIE['TestCookie'];
If you check your code at work, can you let me know what you find. Otherwise, maybe I hava a setting wrong on BB but I don't think so. Seeing as how it worked in Opera, I know I have working code.
Thanks.05-29-09 11:59 AMLike 0 - I thought I had already tried that but in trying again, I don't get that to work in Opera or BB browser. Tried from desktop and it didn't work either. Not sure if its because there is no expiration time but without it the cookie should be good through the end of the session.
If you check your code at work, can you let me know what you find. Otherwise, maybe I hava a setting wrong on BB but I don't think so. Seeing as how it worked in Opera, I know I have working code.
Thanks.
I only get back to work on Wednesday, so until then I won't be able to check.
Btw, check out http://dreamincode.net. Its a great, huge community of helpful programmers who can most likely figure this out faster than I can.05-29-09 12:43 PMLike 0 - Thanks for the info. I registered at Programming and Web Development Help | DreamInCode.net and I'll see what I can find. If you think of anything, let me know
Thanks.05-29-09 03:33 PMLike 0 - Thanks for the info. I registered at Programming and Web Development Help | DreamInCode.net and I'll see what I can find. If you think of anything, let me know
Thanks.05-29-09 09:48 PMLike 0
- Forum
- BlackBerry Developers
- Developers Lounge
How can I authenticate users on website
LINK TO POST COPIED TO CLIPBOARD