Comments (3)
Can you provide some sample code? You can also try stack overflow.
from oauth2.
@IBOutlet weak var nextButton: UIButton!
@IBOutlet weak var emailAdd: UITextField!
@IBOutlet weak var password: UITextField!
var oauth2 = OAuth2PasswordGrant(settings: [
"client_id": "xxxxxxx", // yes, this client-id and secret will work!
"client_secret": "xxxxxxxx",
"authorize_uri" : "xxxx",
"username": emailAdd.text,
"password": "password",
"verbose": true
] as OAuth2JSON)
@IBAction func signInButton(sender: UIButton?) {
oauth2.authConfig.authorizeEmbedded = false
signIn(sender)
}
What I am trying to do is to store "username" and "password" to emailAdd.text and password.text
Is it possible?
from oauth2.
Ah. username
and password
are exposed on that instance, so don't try to assign it when you initialize (you can omit "username" and "password" from the settings). Assign it when the user actually wants to authorize, something like:
@IBOutlet weak var emailAdd: UITextField!
@IBOutlet weak var password: UITextField!
var oauth2 = OAuth2PasswordGrant(...)
func signInButton(sender: UIButton?) {
oauth2.username = emailAdd.text
oauth2.password = password.text
oauth2.authConfig.authorizeEmbedded = false
signIn(sender)
}
from oauth2.
Related Issues (20)
- String to JOSN.parse() issue HOT 1
- Unidy Logout Issues
- authConfig.authorizeContext will not accept a UIWindow HOT 1
- Can I use this for "Sign in with Apple"? HOT 1
- Many 401s
- Clean OAuth2 token HOT 7
- How to wait oauth callback for triggering handleRedirectURL HOT 1
- Xcode 14 Beta will get "This method should not be called on the main thread as it may lead to UI unresponsiveness." warning HOT 1
- "invalid_grant" error in google authentication only for iOS 16 devices.
- mac catalyst can not open login window HOT 1
- App crashes if a token refresh occurs while in the background
- Crash on 'Cancel' in OAuth2Authorizer iOS HOT 1
- Force to use id_token instead of access_token HOT 1
- Keyhain: Access token lost after App Store update HOT 2
- not able to use this framework on widget extension HOT 1
- Project maintenance HOT 5
- VisionOS issue HOT 5
- Avoid using SafariViewController when token expires HOT 4
- Getting an error when building in a M1, using SPM and latest OAuth2 version available HOT 4
- Allow to specify an OAuth2Logger already during initialization
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oauth2.