Yay, Oauth feature is working!

So previously, I complained that the oauth feature in Wt was not working.  It turns out the error was in the redirection endpoint. However, only GoogleService seems to be successful in identifying the user credentials where FacebookService gave a JSON Exception error.  This is probably caused by the change in the HTTP response of Facebook endpoints.

My current objective is to get the GoogleService up and running smoothly, together with the Wt::Dbo. The oauth2 example provided by Wt is similar to the system I need to implement, but some parts need to be omitted, such as the CreateRegistrationView, which is implemented inside the Wt::Auth::AuthWidget library. Resultingly, I would need to create some virtual functions to overwrite the flow.

I think the challenge in this task is to understand how the Wt::Auth library is implemented and how Wt::Dbo is used together with the authentication process. The oauth2 example works well but porting it on my application caused segmentation fault error after the user authentication. I will need to spend some time debugging this error.  Hopefully, I am able to achieve some success next week.

When this oauth feature is up and running, I will probably be able to reduce one entryPoint for the application. I have mentioned before this that an application should have only one entryPoint but currently I have three (for the third-part redirections). As Wt currently provides only Google and Facebook service,  Dropbox and GoogleDrive services would need to be constructed from scratch, but I expect them to be similar.


0 Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.