Need help in OAUTH implementation in angularJS SPA(Single page application)

32 views
Skip to first unread message

Surendra.M

unread,
Oct 1, 2018, 6:07:12 AM10/1/18
to Angular and AngularJS discussion

Hello All,

Currently I am working on  implementation of OAUTH in my AngularJS application.

It involves several steps as below:
1. Calling the Oauth URL for Authorization code : In this step the user has to enter the credentials and click on Login, So , Oauth URL returns Authorization code.
2.Need to send this authorization code for getting the access code from Authentication server.

So, in Step 1,
When the request for the authorization code raises , it will ask for credentials, so, in my case the credentials page should be open in new pop up window.
After entering the credentials, the authorization code should be passed to the parent page.


So, can you pleaseeeeeeeeeeeee give me some inputs how to handle this????or any code references.

Any help would be greatly appreciable.

Thanks in advance.
Surendra M.

Sander Elias

unread,
Oct 2, 2018, 11:45:21 PM10/2/18
to Angular and AngularJS discussion
Hi Surendra,

Create a service that is in control over the auth. You can use that to control a modal you have put in your app, so it pop's up when needed, and keeps the credentials in there. Is this for Angular, or for AngularJS?

Regards
Sander

manduva surendra

unread,
Oct 3, 2018, 2:22:24 AM10/3/18
to ang...@googlegroups.com
Hi Sander,
Thanks for the reply.
This is for AngularJS v1.3.6 application.

As you said, the credentials controls are not my hand to put in a pop up, those will come by the Authentication URL.

I want to give some more detailed information.

I am working on implementation of EPIC with OAUTH. integration in my Application(take it is : EpicTest App) 

I am calling my authentication URL as below :


So ,
        It(The URL) will open in a new browser pop up window.

       In this browser pop up window, The EPIC authentication server will ask credentials of EPIC , the user has to enter the credentials of EPIC and click on LOGIN.

       Once the user clicks on login, the EPIC authentication server will redirects the browser popup window , to the redirect URL mentioned,along with authorization code.

This is my scenario .
hope you got my issue.
Please let me know if you need more details to answer me.
and if you have any code references ,please let me know.

Thanks,
Surendra.









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

Surendra.M

unread,
Oct 5, 2018, 10:20:17 AM10/5/18
to Angular and AngularJS discussion
Hello Sander,

Can you please help me on this....

Or can you elaborate your previous answer....

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

Sander Elias

unread,
Oct 6, 2018, 10:20:34 AM10/6/18
to Angular and AngularJS discussion
Hi Surendra,

Well, as your popup is effectively another site, that gets redirected back to your app, the only thing you can do is handle the callback url, you probably need to do this server side. When you have done that you can have the server pass the token to your frontend.
Ask the auth service provider for a sample, they probably have one with Angularjs

Regards
Sander

manduva surendra

unread,
Oct 11, 2018, 7:58:03 AM10/11/18
to ang...@googlegroups.com
Hi Sander,

Thank you...Sander. will look into it.



--
You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages