Mobile app development with ionicframework

36 views
Skip to first unread message

Raj

unread,
May 23, 2017, 3:27:27 AM5/23/17
to TurboGears
Hi all, 
We are currently developing a web app and mobile app using TG and ionicframework. The webapp is done in TG with front end in AngularJS incorporated in Kajiki template.
The mobile app is developing in ionicframework as a hybrid app.
I have a small doubt regarding the authentication. Can we use the current authentication plugin which used Cookies for mobile app too?
Any insights are appreciated.

Regards,
raj 

Alessandro Molina

unread,
May 23, 2017, 2:04:44 PM5/23/17
to TurboGears
Usually in the case of mobile applications cookie based authentication is uncommon, it's more common to rely on an API token.
But yes, nothing prevents you from using cookie based authentication.

In case you want to roll your own custom authentication based on a token what you need to do is roll your own Identifier and authenticator (see http://turbogears.readthedocs.io/en/latest/turbogears/authentication.html for an explanation of what an identifier is and how TG auth stack works).




--
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email to turbogears+unsubscribe@googlegroups.com.
To post to this group, send email to turbo...@googlegroups.com.
Visit this group at https://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/d/optout.

Raj

unread,
May 23, 2017, 2:36:00 PM5/23/17
to TurboGears
Many thanks for your reply.
I was following the TG authentication doc. But got stuck.
I would like to keep the default auth plugin for the web app and needs a new one for the mobile app.
What app_cfg changes are needed to implement this? 
Not clear from the current doc.


On Tuesday, May 23, 2017 at 11:34:44 PM UTC+5:30, Alessandro Molina wrote:
Usually in the case of mobile applications cookie based authentication is uncommon, it's more common to rely on an API token.
But yes, nothing prevents you from using cookie based authentication.

In case you want to roll your own custom authentication based on a token what you need to do is roll your own Identifier and authenticator (see http://turbogears.readthedocs.io/en/latest/turbogears/authentication.html for an explanation of what an identifier is and how TG auth stack works).



On Tue, May 23, 2017 at 9:27 AM, Raj <www.r...@gmail.com> wrote:
Hi all, 
We are currently developing a web app and mobile app using TG and ionicframework. The webapp is done in TG with front end in AngularJS incorporated in Kajiki template.
The mobile app is developing in ionicframework as a hybrid app.
I have a small doubt regarding the authentication. Can we use the current authentication plugin which used Cookies for mobile app too?
Any insights are appreciated.

Regards,
raj 

--
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email to turbogears+...@googlegroups.com.

Raj

unread,
May 23, 2017, 3:17:57 PM5/23/17
to TurboGears
Actually I would like to have a app_cfg example with multiple authentication plugin configurations.
Any help?

Raj

unread,
May 24, 2017, 1:05:58 PM5/24/17
to TurboGears
As of now, using the default authentication mechanism. And seems working for the mobile app too.

Alessandro Molina

unread,
May 25, 2017, 5:08:38 AM5/25/17
to TurboGears
That's a good idea, I'll try to add an example to the documentation across next week.

To unsubscribe from this group and stop receiving emails from it, send an email to turbogears+unsubscribe@googlegroups.com.

Alessandro Molina

unread,
May 29, 2017, 5:14:42 PM5/29/17
to TurboGears
Development branch of documentation now includes a tutorial on how to add a simple custom identifier: http://turbogears.readthedocs.io/en/development/turbogears/authentication.html#simpletoken-example

Note that providing "default" in identifiers is not supported in current stable release, it will only be supported in upcoming 2.3.11.
To keep cookie based authentication too in 2.3.10 you will have to manually add a repoze.who.plugins.auth_tkt.AuthTktCookiePlugin instance to identifiers and authenticators.


Raj

unread,
Jul 21, 2017, 12:08:58 PM7/21/17
to TurboGears
Dear Alessandro,
Many thanks for this code example.
Reply all
Reply to author
Forward
0 new messages