By default the state will include a csrf value that is stored in the as json object as well as the session in order to prevent cross site request forgery. You may use this method to add additional members to the state json object.
Overrides the default oauth behavior to hand back the redirect to your callback rather than do the redirect for you; handy when custom behavior is desired, or when you simply wish to use the endpoint that is calling this as a proxy
// this is the default behavior if this is not called
B.net.oauth.flows.code.relateData.flow()
.provider(provider)
.addToState("action", action)
.addToState("provider", provider)
.authorizationCodeCallback(
// THIS IS THE `DEFAULT BEHAVIOR`
url => B.net.response.redirect(url)
)
.authorize();
// this is a potential other implementation
B.net.oauth.flows.code.relateData.flow()
.provider(provider)
.addToState("action", action)
.addToState("provider", provider)
.authorizationCodeCallback(
url => {
formEntry.fields.savedAuthUrl.val(url);
B.net.response.out(url);
}
)
.authorize();
TODO
This callback gets called after authorization is successful. Required for all OAuth flows.
This callback gets called for errors. The default actions is:
throw new OAuthException(errorMssg);`
The OAuth User to use. If userRelateDataStore is false the credentials will be stored in the session.
The OAuth User to use. If the user is not provided, or isn't a user, or doesn't have relate data (e.g. a super user) then credentials will be stored in the session.
Generated using TypeDoc
TODO
Example