javascript - Using PHP login along side OAuth2 -


so creating website learn php/javascript/html/css , on , ran problem can't come solution. have regular login form using php uses post send data , authenticate. want integrate external twitch.tv oauth2 authentication.

by using normal php login store information inside postgresql database using php. want similar using oauth2. example store twitch.tv name username inside database , token password.

the problem external authentication using based on javascript api , stores information inside dom storage found unable access using php. redirect_uri token fragment can't retrieved php.

should scrap js part , try doing entirely in php?

side question: checked other website uses twitch authentication , uses these callback links "https://api.nightbot.tv/auth/twitch/callback?code=****". these callbacks?

you should use redirects implied js frameworks. works same facebook. redirects used token. generate on side random token store in session. once user logs in using js api, api redirect callback page (php in case). in page, verify token once (that had passed , got back, must same), , token api use api. @ point can user information querying api using api token. user info api , can query down db @ point log user in etc. hope helps..


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -