Comments (14)
You should direct the user to bitclout.com or yourbitcloutnode.com. bitclout.com embeds the identity iframe which you should be able to communicate with. If you run your own site, all it needs is an iframe with identity.
Open to ideas for making this easier if you have any
from identity.
Actually, you might just be able to load identity.bitclout.com/embed in a WKWebView and it will support everything you need. Give that a try
from identity.
from identity.
@maebeam Are there any docs on this intended usage (Iframe + message posting)? Just a sentence or three would be very helpful.
from identity.
I think what you want is a webview of /embed and WKWebView.evaluateJavaScript
. We want to encourage app developers to use identity.bitclout.com to log users in and sign transactions so that the user has a single place to manage all of their identities and they don't need to enter their seed phrases into random apps/websites.
from identity.
For example: on a WKWebView
of /embed
, run
webView.evaluateJavaScript('
window.postMessage({
service: 'identity',
id: 'uuid-v4',
method: 'sign',
transacitonHex: '12345',
})
');
You'll need to submit a pull request to this repo to support a "webkit embed view" that sends responses to webkit instead of to the parent window. This could be triggered with /embed?webkit=true
or even /webkit-embed
if the logic diverges significantly. For example:
webView.configuration.userContentController.add(self, name: "jsHandler")
and
window.webkit.messageHandlers.jsHandler.postMessage("trigger from JS");
If you want to get fancy you can make a Swift library that does this all behind the scenes so other app developers don't need to set any of this up.
from identity.
The intended usage for this service in a web browser is very easy. Just put /embed
in an iframe for signing transactions. For logging users in, use window.open('/log-in')
and listen for a response.
from identity.
Actually, you might just be able to load identity.bitclout.com/embed in a WKWebView and it will support everything you need. Give that a try
I've tried this, but it immediately redirects to https://bitclout.com
from identity.
(Sorry if this is off topic)
I'm trying to implement login with BitClout in a web app, but when I window.open identity.bitclout.com/log-in I just get a blank page.
Are there any particular parameters I need to pass over from my own domain or other setup I need to do?
from identity.
I've been testing on Android (using a Webview within my app) and I have the same issue as @andyboyd, when I navigate to identity.bitclout.com or any of the paths such as /embed it redirects to bitclout.com due to the code at the start of ngOnInit
in the app component. I'm guessing these checks are there for security purposes? They may need to be changed to allow Webviews to work.
Working around that issue on localhost I've made some progress. Though I've had to deal with responding to events such as initialize being fired out as they expect bitclout.com to be responding to them otherwise the rest of the code doesn't execute.
from identity.
Not sure if it's helpful or not, but I was able to get Login with BitClout working for my web app, I posted a very basic POC here:
https://github.com/mubashariqbal/login-with-bitclout
Might be helpful for mobile apps developers too.
from identity.
@ryanjohn1 @andyboyd i am happy to remove the redirect. it's not for security, just convenience.
from identity.
but i am pretty sure you will still need to add support for calling webkit handlers instead of parent.postMessage
from identity.
from identity.
Related Issues (20)
- Get Shared Secrets show blank window HOT 1
- Incorrect spending formatting in Approve HOT 1
- Identity fails to load window content
- JWT iframe request returns TypeError HOT 2
- Error trying to change profile picture. HOT 1
- JWT iframe request returns TypeError (re-open) HOT 1
- "transactionSpendingLimitHex" is undefined when creating a derived key and user is not logged HOT 1
- Someone else generated the same private seed phrase with "sign up with Deso seed" HOT 4
- Running deso identity in ng serve vs ng build HOT 1
- Identity misbehaving while using in localhost
- Global Deso limit for NFT bid transactions seems to apply to gas, and not bid amount
- Getting error while doing submit-transaction after using signTransaction function HOT 1
- Issue with get free deso and public keys
- uint64 overflow sometimes HOT 3
- Identity requests Approval for every transaction after cookie expires HOT 4
- Sometimes bitcloutToSellNanos is a negative number
- Questions about approved transactions HOT 2
- identity still makes request to bitclout.com
- 414 URI Too Large on Tx signing HOT 2
- `derivedSeedHex` and Messages throws `Incorrect HMAC` error HOT 3
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 identity.