I have used auth0 with meteor js and dont want to use remember me feature of auth0. I want to disable it . I have tried with
https://demo.auth0.com/v2/logout?returnTo=http://localhost:3000
it works but it gives white screen in mobile for a second.
any other options for it.
To clarify, are you using Lock, the login dialogue? If so, you can set the rememberLastLogin attribute to false on initialization, documented here:
https://auth0.com/docs/libraries/lock/customization#rememberlastlogin-boolean-
Related
I am creating an app using Polymer and Polymerfire elements and I can't find an effective way to share user and auth references across the app.
My current solution of receiving auth reference is as follows:
var auth = document.getElementById('appID').app.auth()
This approach works but I have a hunch that there should be a better way.
Second problem is, that I am not sure howto get the user reference in subviews, were getting the reference by property sharing would be super cumbersome(and I've been having issues using this approach).
I was thinking that using iron-meta tag might solve the issue, but that would mean that on every login and logout I would have to set the value "manually". So is there a more straightforward way to share the reference?
If I access the firebase-auth reference directly:
document.getElementById('authID').user
Then there is a problem that when it's accessed in the element's ready function call it's always null. If it's called later, then it works fine but I need to check if the user is logged in in ready call(and redirect to login page).
Plus, this approach doesn't work at all if global Polymer setting is set to: dom: 'shadow' (The firebase-auth is not located in index.html but lower and with this setting I am able to access only the index.html elements.) and this setting is supposed to be set by default in the future and I want the solution to be future-proofed.
I'll be grateful for any responses, Jan
The polymer fire element created by the polymer team will solve all your problems.
It's divided into the following elements:
firebase-auth
firebase-app
firebase-document
firebase-query
firebase-messaging
Video Tutorial Authentication with Firebase -- Polycasts #57
Official Documentation
I solved the issue. Apparently it's possible to initialize the firebase-auth element wherever you want and the element retains the app state as long as the app name is provided.
<firebase-auth id="auth" app-name=name-of-the-app"></firebase-auth>
Than just use the element reference:
this.$.auth
I'm trying to add an 'Apply by LinkedIn' button to my website. I realise the plugin was deprecatad and am trying to use the JS SDK to create this. What I currently have in place (as documented here) will allow me to sign in to my account, however, the documentation doesn't go any further. How is the user to apply for a specific position, should this be referenced in the url somewhere?
Also, I've submitted the application to access the API but have heard nothing back after 9 days.
Any feedback appreciated,
Thanks :)
Can I use Iron-Router in Meteor to push a new state onto the browser's history, without going to a new URL?
I would like to show a modal but enable to user to hide it again using the back button.
AFAIK you can't push browser state "silently" with the Iron Router package. However you can use one of these methods or the HTML 5 History API package that wraps this package - https://github.com/devote/HTML5-History-API
Haven't tried this, but I think something based on
Router.go(Router.current().request.url + '/modal')`
might work. You define your route with an optional parameter, and if it's 'modal' then display the modal. That may lead to problems if you have URL parameters, in which case you'd have to get more clever with the URL.
I am finding certain devices are not being redirected to the .Mobile.cshtml counterpart automatically. Is there a way to fix this or force mobile based on screen resolution via HttpContext.GetOverriddenBrowser method?
You could try to add a little piece of Javascript to create a cookie with Javascript's
window.screen.availHeight
window.screen.availWidth
and then on the server side inspect the cookie in the _PageStart.cshtml (which runs before each page is returned) and and if it meets your requirements override with
HttpContext.SetOverriddenBrowser(BrowserOverride.Mobile)
I've been checking out facebook connect stuff from the new actionscript 3 library from Adobe. I have been trying to figure out how to use the facebook connect button inside of a flex app.
In an html page you would us the fbml and it would automatically put the facebook connect button on your page and when the user clicks on it it pops up the face div and lets the user login. Well you can't use that in flex. So I could put it on the page containing the swf but, that's why I'm using flex and not html. I've seen it done by the guys at Universal Mind so I know it's possible. I just need a little direction.
I know the function to use in the facebook connect api to cause that login dialog to come up I just can't figure the correct combination.
Chcek out the Create your first Facebook application with Flex tutorial and in particular the section on Add Facebook login.
This should be applicable to Flex. This would be done using the ExternalInterface calls from within Flash.
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/external/ExternalInterface.html
In Adobe facebook-actionscript-api there is a class LoginWindow which you can use.
When you need it this window will open like small flash popup window and it will display facebook login page and enable user to login. All needed events will be raised and you should be connected after that. I didn't tested it but from the code looks like what you need.
this developer created this js/flash bridge you are talking about using the ExternalInterface classes. you can download all source files as well. i found it very useful.
http://www.wellconsidered.be/blog/2009/01/04/facebook-connect-to-actionscript-3/
There is also a very clean and elegant solution/tutorial at:
http://www.stevenvh.be/blog/?p=57
Use this API:
http://code.google.com/p/facebook-actionscript-api/
Look at ConnectDemo.
The sample kind of sucks... it forces you to connect before showing the Flex app.
You need to tweek the example to get it to do what you want.
Also, FB depreciated some of the methods, so you have to look up new methods that aren't depreciated.
I'd love to update the sample, but I don't have the time to dedicated to another project.