title: example codes needed when using OAuthSwift and identityserver3
body: <p>I have set up an identity server using identityServer3. Now I am writing an iOS app to authenticate against the identity server. I could not find any example or codes for this setup. The examples I found are all using google, or github etc. My problem is that the call <code>OAuthSwift.authorizeWithCallbackURL</code> just switch the screen to safari and then nothing shows up. I suspect that my setup of callbackurl or url scheme is not correct. </p>
  
  <p>Here is my code snippet</p>
  
  <p><strong>ON server side:</strong></p>
  
  <pre><code>    new Client {
              ClientId = "implicitclient1",
              ClientName = "Example Implicit Client1",
              ClientSecrets = new List&lt;Secret&gt;
                  {
                      new Secret("secret".Sha256())
                  },
              Enabled = true,
              Flow = Flows.Implicit,
              RequireConsent = true,
              AllowRememberConsent = true,
              RedirectUris = 
                new List&lt;string&gt; {"oauth-swift://oauth-callback/TestOAuth2"},
  
              AllowedScopes = new List&lt;string&gt; {
                  Constants.StandardScopes.OpenId,
                  Constants.StandardScopes.Profile,
                  Constants.StandardScopes.Email
              },
              AccessTokenType = AccessTokenType.Jwt
          },
  </code></pre>
  
  <p><strong>on iOS app side:</strong></p>
  
  <pre><code>   let oauthswift = OAuth2Swift(
          consumerKey: "implicitclient1",
          consumerSecret: "secret",
          authorizeUrl: "https://example.com/idserver/core/connect/authorize",
          accessTokenUrl: "https://example.com/idserver/core/connect/token",
          responseType: "token"
      )
  
      oauthswift.authorizeWithCallbackURL(NSURL(string: "oauth-swift://oauth-callback/TestOAuth2")!,
                                          scope: "openid",state: "",
                                          success: {
                                              credential, response, parameters in
                                              print(credential.oauth_token)},
                                          failure: {
                                              error in
                                              print(error.localizedDescription)
      })
  </code></pre>
  
  <p>When adding URL types to the ios app, I put in "TestOAuth2".</p>
  
  <p>What did I do wrong?</p>
  
  <p>Thanks a lot.</p>