How to generate OAuth2.0 authentication authorization code using ruby code?

any sample code getting stucked in authorization part. would be greatful if anyone share it.

Can you provide more details about the project?